473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Status of PEPs?

Hello Python-Fans,

A few months in the past, I learned the Python language and was very pleased
of it. I have now written many scripts for myself and this opinion stayed,
not to say, it became more intensive.

Recently I have discovered the PEP Archive, and my question is now this:
There are many open ("under consideration") PEPs that would incorporate
useful features into the language, such as the do-while statement, the
switch statement or the __main__ function. However, most of these proposals
are several years old. Though implementations seem to exist for the
proposals, no action is taken about them. Why is this so? What has to be
done for a proposal to make it into the language?

Thank you for answering a dumb question...

--
greetz tom
Jul 18 '05 #1
13 1549
"Thomas Reichelt" <XX********@gibts.net> wrote in message
news:2k************@uni-berlin.de...
Hello Python-Fans,

A few months in the past, I learned the Python language and was very pleased of it. I have now written many scripts for myself and this opinion stayed,
not to say, it became more intensive.

Recently I have discovered the PEP Archive, and my question is now this:
There are many open ("under consideration") PEPs that would incorporate
useful features into the language, such as the do-while statement, the
switch statement or the __main__ function. However, most of these proposals are several years old. Though implementations seem to exist for the
proposals, no action is taken about them. Why is this so? What has to be
done for a proposal to make it into the language?

Thank you for answering a dumb question...
It's not a particularly dumb question. The missing piece is that there
are a limited number of core developers, and you need to get a
concensus among them on the Python Dev mailing list that this
particular proposal is more worthy of their time than other
competing proposals. You also need to get it past Guido. Also
note that in two cases you would be adding keywords, which
impose a significant forwards compatibility issue, while the
third has a major issue of non-obviousness.

The proposals you mention all fall into the category of "useful,
but there are other ways of doing that job that work, are well
accepted, and are not a significant burden in terms of either
developer time or comprehensibility."

Put another way, there was a significant against component in the
discussion from the "keep Python simple" crowd.

In other words, to move any of them forward would require submission
of a complete implementation that would work in the current
development tree, together with the necessary documentation
changes, thorough tests, and so on and so forth. That is, someone
who wants to see any of these in Python needs to do the work
themselves.

A good example of this is the work being done by Facundo Batista
on PEP 327 (Decimal Arithmetic). There's been widespread
agreement for a long time that something should be done about
decimal arithmetic, but until he stepped forward, it sat on dead
center. Now it looks like we're going to get it for Python 2.4,
so it may be possible for us to get a usable currency type in
Python 2.5 (building on the decimal type.)

John Roth


--
greetz tom

Jul 18 '05 #2

"Thomas Reichelt" <XX********@gibts.net> wrote in message
news:2k************@uni-berlin.de...
Hello Python-Fans,
Recently I have discovered the PEP Archive, and my question is now this:
There are many open ("under consideration") PEPs that would incorporate
useful features into the language, such as the do-while statement, the
switch statement or the __main__ function. However, most of these proposals are several years old. Though implementations seem to exist for the
proposals, no action is taken about them. Why is this so? What has to be
done for a proposal to make it into the language?


Last question first: one of the initial PEP discusses the PEP approval
process.

Previous question: last step is approval by GvR, which, I believe, requires
a request for a yea/nay decision, which PEP writers may not bother to do
when they expect a nay, at least at the current time. I agree that this is
not helpful for a newcomer who has not read the discussions here for
several years.

Terry J. Reedy


Jul 18 '05 #3
John Roth wrote:
"Thomas Reichelt" <XX********@gibts.net> wrote in message
news:2k************@uni-berlin.de...
Hello Python-Fans,

A few months in the past, I learned the Python language and was very

pleased
of it. I have now written many scripts for myself and this opinion
stayed, not to say, it became more intensive.

Recently I have discovered the PEP Archive, and my question is now this:
There are many open ("under consideration") PEPs that would incorporate
useful features into the language, such as the do-while statement, the
switch statement or the __main__ function. However, most of these

proposals
are several years old. Though implementations seem to exist for the
proposals, no action is taken about them. Why is this so? What has to be
done for a proposal to make it into the language?

Thank you for answering a dumb question...


It's not a particularly dumb question. The missing piece is that there
are a limited number of core developers, and you need to get a
concensus among them on the Python Dev mailing list that this
particular proposal is more worthy of their time than other
competing proposals. You also need to get it past Guido. Also
note that in two cases you would be adding keywords, which
impose a significant forwards compatibility issue, while the
third has a major issue of non-obviousness.

The proposals you mention all fall into the category of "useful,
but there are other ways of doing that job that work, are well
accepted, and are not a significant burden in terms of either
developer time or comprehensibility."

Put another way, there was a significant against component in the
discussion from the "keep Python simple" crowd.

In other words, to move any of them forward would require submission
of a complete implementation that would work in the current
development tree, together with the necessary documentation
changes, thorough tests, and so on and so forth. That is, someone
who wants to see any of these in Python needs to do the work
themselves.

A good example of this is the work being done by Facundo Batista
on PEP 327 (Decimal Arithmetic). There's been widespread
agreement for a long time that something should be done about
decimal arithmetic, but until he stepped forward, it sat on dead
center. Now it looks like we're going to get it for Python 2.4,
so it may be possible for us to get a usable currency type in
Python 2.5 (building on the decimal type.)


Thank you for your explanation. What I don't understand, though, is that the
PEPs for which an implementation exists aren't discussed further, but are
just lying around in a corner, though there is a significant advantage in
the PEP's proposal. I understand that the introduction of a new keyword is
a drastic change, but Python has good capabilities to compensate for that
(from __future__ ...).

It is clear that most of the proposed syntactic enhancements can be rebuilt
with the existing language, but sometimes only with code duplication or
clumsy constructs.

--
greetz tom
Jul 18 '05 #4
>>>>> "Thomas" == Thomas Reichelt <XX********@gibts.net> writes:

Thomas> Thank you for your explanation. What I don't understand,
Thomas> though, is that the PEPs for which an implementation
Thomas> exists aren't discussed further, but are just lying around
Thomas> in a corner, though there is a significant advantage in
Thomas> the PEP's proposal. I understand that the introduction of
Thomas> a new keyword is

Even if something has a significant advantage, it's might not be
significant enough to warrant bloating the language. The cost of
implementing a feature is trivial compared to the cost of increased
language complexity. In that way python is different from perl or
ruby, where everything that someone bothers to provide a patch for
gets included.

Thomas> It is clear that most of the proposed syntactic
Thomas> enhancements can be rebuilt with the existing language,
Thomas> but sometimes only with code duplication or clumsy
Thomas> constructs.

Many features are only attractive because some other language has it,
and people mistakenly believe that python should have it too. do-while
is an example of a worthless feature that people think they want, but
that really adds nothing to
while 1:
do stuff
if condition:
break
--
Ville Vainio http://tinyurl.com/2prnb
Jul 18 '05 #5
Ville Vainio wrote:

Many features are only attractive because some other language has it,
and people mistakenly believe that python should have it too. do-while
is an example of a worthless feature that people think they want, but
that really adds nothing to
while 1:
do stuff
if condition:
break


Well, in my opinion this kind of defeats the purpose of a while-loop. The
original intention is to test the condition in the while-statement, and not
to set up an infinite loop and break out somewhere. The behavior of while
(1) { } even generates a warning in other languages...

--
greetz tom
Jul 18 '05 #6
>>>>> "Thomas" == Thomas Reichelt <XX********@gibts.net> writes:
while 1:
do stuff
if condition:
break


Thomas> Well, in my opinion this kind of defeats the purpose of a
Thomas> while-loop. The original intention is to test the
Thomas> condition in the while-statement, and not to set up an

Original intention for whom? You can imagine "while 1:" as an alias
for "loop:", i.e. an eternal loop.

The distrust of 'while 1' just needs to be unlearned, which is a
matter of education.

Thomas> infinite loop and break out somewhere. The behavior of
Thomas> while (1) { } even generates a warning in other
Thomas> languages...

That's because 1 is not a conditional statement. It needs to be
spelled out as "while(true)", or "for (;;)" in boolean-challenged old
c++.

--
Ville Vainio http://tinyurl.com/2prnb
Jul 18 '05 #7
Ville Vainio wrote:
>>"Thomas" == Thomas Reichelt <XX********@gibts.net> writes:
>>
>> >> while 1:
>> do stuff
>> if condition:
>> break


Thomas> Well, in my opinion this kind of defeats the purpose of a
Thomas> while-loop. The original intention is to test the
Thomas> condition in the while-statement, and not to set up an

Original intention for whom? You can imagine "while 1:" as an alias
for "loop:", i.e. an eternal loop.

The distrust of 'while 1' just needs to be unlearned, which is a
matter of education.

Thomas> infinite loop and break out somewhere. The behavior of
Thomas> while (1) { } even generates a warning in other
Thomas> languages...

That's because 1 is not a conditional statement. It needs to be
spelled out as "while(true)", or "for (;;)" in boolean-challenged old
c++.

Hello,

Hmm, respectfully - I disagree with that - I think that
while(true) is horrible. When reading through code - I expect something
like :

while <this statement == true>, keep repeating

So for while(true), I read :

while <true == true>, keep repeating

The use of the break statement is non-obvious to me, a flag to
escape the loop is more typing but avoids the while(true) - which IMO
compilers for many languages throw warnings about. The ideal thing to
me would be to declare a flag (if needed) in the definition of the while
statement which would limit the scope to exactly the correct field. I
also agree however that do/while is not needed as flags work equally as
well.

It's a matter of syntactical reading of code and a philosophical
point. I must admit that there are some constructs commonly used in
Python that make me cringe (throwing exceptions as a matter of
convenience when you could detect that situation and not throw the
exception in the first place - for example) - however and this is the
important point, if these constructs are in common use in a language,
you basically just have to accept them and move on. Life is too short!!

Have a good weekend!

Cheer,

Neil

--

Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 47
D-01307
Dresden
Germany

Tel : +49 (0)351 4173 154
e-mail : be**@cenix-bioscience.com
Cenix Website : http://www.cenix-bioscience.com
Jul 18 '05 #8
>>>>> "Neil" == Neil Benn <be**@cenix-bioscience.com> writes:

Neil> Hmm, respectfully - I disagree with that - I think that
Neil> while(true) is horrible. When reading through code - I expect
Neil> something like :

Neil> while <this statement == true>, keep repeating

Neil> So for while(true), I read :

Neil> while <true == true>, keep repeating

My brain immediately converts 'while 1' to 'loop forever' when it is
seen in code.

Neil> The use of the break statement is non-obvious to me, a flag
Neil> to escape the loop is more typing but avoids the while(true)
Neil> - which IMO compilers for many languages throw warnings
Neil> about. The ideal thing to

If you get a warning, use 'for (;;)'. Some environments (Symbian OS)
define a FOREVER macro, but I don't really see the point.

There are two highly idiomatic ways to use while 1:

while 1:
a = getobject()
if a is None:
break # flag doesn't work, you'd need to do "continue"
process(a)
morestuff(a)
while 1:
dostuff()
done = morestuff()
if done:
break
Neither really benefit from the flag approach. For both cases, it's
obvious that the break applies for 'while 1' condition.

Neil> important point, if these constructs are in common use in a
Neil> language, you basically just have to accept them and move
Neil> on. Life is too short!!

My advise would be that if something deeply bothers you in Python
design, it's better first to explore why you feel that way, and
whether the problem could really be with your own preconceptions and
expectations. For me, that has been the case on several occasions.

And believe me, as a C++ programmer, I don't hesitate to question the
decisions of language designers. After a decent amount of C++
exposure, Python's flaws seem ridiculously small.

--
Ville Vainio http://tinyurl.com/2prnb
Jul 18 '05 #9
On 02 Jul 2004 15:37:30 +0300,
Ville Vainio <vi***@spammers.com> wrote:
while 1:
a = getobject()
if a is None:
break # flag doesn't work, you'd need to do "continue"
process(a)
morestuff(a)


keep_trying = True
while keep_trying:
a = getobject( )
if a:
process( a )
morestuff( a )
else:
keep_trying = False

Or:

a = getobject( )
while a:
process( a )
morestuff( a )
a = getobject( )

although some people dislike the redundancy more than the extra flag or
the break statement.

OTOH, these arguments have all been had before. Google for things like
"loop and a half."

Regards,
Heather

--
Heather Coppersmith
That's not right; that's not even wrong. -- Wolfgang Pauli
Jul 18 '05 #10
Heather Coppersmith <me@privacy.net> wrote in
news:m2************@unique.phony.fqdn:
On 02 Jul 2004 15:37:30 +0300,
Ville Vainio <vi***@spammers.com> wrote:
while 1:
a = getobject()
if a is None:
break # flag doesn't work, you'd need to do
"continue"
process(a)
morestuff(a)


keep_trying = True
while keep_trying:
a = getobject( )
if a:
process( a )
morestuff( a )
else:
keep_trying = False

Or:

a = getobject( )
while a:
process( a )
morestuff( a )
a = getobject( )


Or for those of a less masochistic inclination, just use a for loop:

for a in iter(getobject, None):
process(a)
morestuff(a)
Jul 18 '05 #11
>>>>> "Duncan" == Duncan Booth <me@privacy.net> writes:

Duncan> Or for those of a less masochistic inclination, just use a
Duncan> for loop:

Duncan> for a in iter(getobject, None):

Cute. For those too lazy to check:

iter(callable, sentinel) -> iterator

Get an iterator from an object. In the first form, the argument
must supply its own iterator, or be a sequence.

In the second form, the callable is called until it returns the
sentinel.

(I bet many, including me, haven't heard of this).

It kinda loses some of its appeal when getobject() takes arguments,
though - you'll have to go for lambda then:

for a in iter(lambda : getobject(2,"hi"), None):

--
Ville Vainio http://tinyurl.com/2prnb
Jul 18 '05 #12
In article <10*************@news.supernews.com>,
John Roth <ne********@jhrothjr.com> wrote:

A good example of this is the work being done by Facundo Batista on PEP
327 (Decimal Arithmetic). There's been widespread agreement for a long
time that something should be done about decimal arithmetic, but until
he stepped forward, it sat on dead center. Now it looks like we're
going to get it for Python 2.4, so it may be possible for us to get a
usable currency type in Python 2.5 (building on the decimal type.)


Just for the record, I actually started Decimal.py with a lot of help
from Tim Peters, and then Eric Price moved it forward quite a bit before
Facundo picked it up. I don't care that much about the credit for me,
but I think it's important to remember that Open Source projects are
usually the result of collaboration from many people.
--
Aahz (aa**@pythoncraft.com) <*> http://www.pythoncraft.com/

"Typing is cheap. Thinking is expensive." --Roy Smith, c.l.py
Jul 18 '05 #13
[Aahz]
Just for the record, I actually started Decimal.py with a lot of help
from Tim Peters, and then Eric Price moved it forward quite a bit before
Facundo picked it up. I don't care that much about the credit for me,
but I think it's important to remember that Open Source projects are
usually the result of collaboration from many people.


That's right. There's no way this module could have gotten in to 2.4
if any one of Aahz, Eric Price, Facundo Batista, or Raymond Hettinger
hadn't contributed major effort to pushing it through its development
phases -- or if IBM's Mike Cowlishaw hadn't devoted years to studying
the issues and crafting a complete, coherent standard for decimal
arithmetic, then made it and extensive test vectors freely available
over the web. It could well have made it without me -- but it would
have sucked then <wink>.
Jul 18 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: David Abrahams | last post by:
Since a significant part of Python is only documented in PEPs, I am disappointed to see that they can't be easily found. Where are they? -- Dave Abrahams Boost Consulting...
3
by: Gerrit Holl | last post by:
Hi, would it be a good idea to automatically sumbit all new peps to comp.lang.python.announce? After all, each PEP is an announcement and may be important to the entire Python community. Another...
3
by: Bengt Richter | last post by:
I find that threads sometimes mention PEPs that I wasn't aware of, or that an interesting one has been updated without my noticing. I should perhaps check the PEP site more regularly, but ISTM it...
6
by: Ada | last post by:
i have a little bit of issue getting the status bar to work properly. this is what happens now. when the program loaded, the status is "READY..." the code is inside the FORM LOAD. i also...
3
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change?...
4
by: Mark | last post by:
Hey folks, I'm looking at making the following query more efficient potentially using the ranking functions and I'd like some advice from the gurus. The purpose of the following is to have a...
3
by: bharathreddy | last post by:
This article will explain you how to find the status of the fax operation. (Using FAXCOM.dll). Author: Bharath Reddy VasiReddy Reference to the FAXCOM.DLL Reference to import FAXCOM...
81
by: Russ | last post by:
I just stumbled onto PEP 316: Programming by Contract for Python (http://www.python.org/dev/peps/pep-0316/). This would be a great addition to Python, but I see that it was submitted way back in...
9
by: tshad | last post by:
I have a Windows App that is doing some work and then writing a "Now Processing..." line to the status line of the window as well as the Textbox on the form. But the problem is that the work is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.