python-dev Summary for 2004-05-01 through 2004-05-31

This is a summary of traffic on the python-dev mailing list from May 01, 2004 through May 31, 2004. It is intended to inform the wider Python community of on-going developments on the list. To comment on anything mentioned here, just post to comp.lang.python (or email python-list at python dot org which is a gateway to the newsgroup) with a subject line mentioning what you are discussing. All python-dev members are interested in seeing ideas discussed by the community, so don't hesitate to take a stance on something. And if all of this really interests you then get involved and join python-dev!

This is the forty-first and forty-second summaries written by Brett Cannon (out of school and employed for the summer).

To contact me, please send email to brett at ; I do not have the time to keep up on comp.lang.python and thus do not always catch follow-ups posted there.

All summaries are archived at .

Please note that this summary is written using reStructuredText which can be found at . Any unfamiliar punctuation is probably markup for reST (otherwise it is probably regular expression syntax or a typo =); you can safely ignore it, although I suggest learning reST; it's simple and is accepted for PEP markup and gives some perks for the HTML output. Also, because of the wonders of programs that like to reformat text, I cannot guarantee you will be able to run the text version of this summary through Docutils as-is unless it is from the original text file.

The in-development version of the documentation for Python can be found at and should be used when looking up any documentation on new code; otherwise use the current documentation as found at . PEPs (Python Enhancement Proposals) are located at . To view files in the Python CVS online, go to . Reported bugs and suggested patches can be found at the SourceForge project page.

The Python Software Foundation is the non-profit organization that holds the intellectual property for Python. It also tries to forward the development and use of Python. But the PSF cannot do this without donations. You can make a donation at . Every penny helps so even a small donation (you can donate through PayPal or by check) helps.

Summary Announcements

The Spring quarter is now finished for me, so hopefully over the summer I can go back to a semi-monthly schedule (work permitting).

2.3.4 was released during the coverage time of this summary. Everyone should upgrade if possible to this bugfix release.

2.4a should be ready by mid-July.

The email server I use (not under my control) decided to change their IMAP server. Unfortunately it is not playing nicely with Thunderbird or the mbox format, so I am being forced to use Apple Mail in order to delete emails. Since I am not used to Mail's threading I may have missed some threads. If I did, sorry about that and they will be covered in the next summary.


Generator expressions are in!

Generator expressions have been checked in. They are currently using late bindings (see the last summary for an explanation of what that means). If using late binding semantics doesn't work for you, do express your opinion since it can be changed before the beta is released.

Contributing threads:
Following the docs, not the implementation

What happens if you rely on an implementation when the documentation explicitly states the semantics in another way? Well, "you will pay for your sin in a special kind of hell set aside for people who take the implementation as the spec" according to Guido. Some things in CPython go against the spec for performance reasons, but there is nothing stopping from it being changed at another point to more closely follow the spec.

Contributing threads:
What you need to get a module into the stdlib

In order to prevent the stdlib from getting bloated with unneeded modules, new ones need to have seen use "in the field", as Guido put it.

Contributing threads:
2.3.4 is out the door

Python 2.3.4 has been released. Being a bugfix there are no new features. It is recommended that everyone upgrade to this version.

Contributing threads:
IPv6 for Windows in 2.4

For those of you wanting IPv6 support on Windows in the binary build, you will get it in 2.4 . The reason it isn't in 2.3.x is that the branch is compiled with VC 6 which can only compile in IPv6 support with a separate SDK. VC 7, on the other hand, does not have this issue.

Contributing threads:
cookielib in the stdlib

A module named cookielib was added to the stdlib to allow transparent handling of cookies for modules such as urllib2.

Contributing threads:
cmp doesn't call __cmp__

It was pointed out that calling cmp(x,x)` does not call x.__cmp__(x) but instead uses PyObject_RichCompareBool(). The issue with this is that PyObject_RichCompareBool() has a short-circuit for when the object being compared is the same, thus skipping a possible call to x.__cmp__ and saving some time.

This can be an issue, though, if you want something other than True or False to be returned. Basically what came out of this thread was that C functions can short-circuit comparisons so be careful if you want to make sure that __cmp__ is called; use '==' and the other comparison operators instead.

Contributing threads:
Posssible improvements to import.c

Tim Peters asked if anyone knew the working details of import.c; no one spoke up. The question was brought up because Tim would like to see failed imports not lead to mangled modules being in sys.modules and thus being considered properly imported. The suggestion of also handling circular imports came up as well.

Contributing threads: