Someone on StackOverflow asked: Which version of python added the else clause for for loops?. While the online documentation only goes back to 1.4, I remembered that the original code was posted to the alt.sources newsgroup. A bit of a search and I found copies of the original 21 shar files. (20 shar files, because #2 was withdrawn, then 21 again because of patch #1).
I downloaded them, unshar'ed the archive, applied the patch, configured the Makefile correctly, fixed a few compilation problems, and the result was a running version of Python 0.9.1!
[python-0.9.1/src]% ./python >>> for i in range(10): ... pass ... else: ... print '"for" has an "else"!' ... "for" has an "else"! >>>
And very primitive it is too. No copyright message when it starts up. Bad error reporting. Class delaration requires a () even when there are no parents. There's no __init__ special method, so the convention is to call 'Create()' yourself. Uses 'self' and 'this' and other terms instead of only 'self'. Only understands 'single quote strings' and not "double quotes."
Still, it does work. I've put a copy of it at online for your enjoyment. The changes I made are documented in "README.reconstructed". I see that python.org only has Python releases to 1.0.1, so I'll let them know about my reconstruction.
Note: I am not taking any patches. :)
Andrew Dalke is an independent consultant focusing on software development for computational chemistry and biology. Need contract programming, help, or training? Contact me
Copyright © 2001-2013 Andrew Dalke Scientific AB