Python-dev summary: Jul 1-15
Note: this is an experiment in whether I can make a useful, interesting, somewhat coherent summary of python-dev activity. Things I'm not sure of: * Accuracy. I skipped past some threads such as the list comprehensions one, and may be unaware of a resolution. * How many links are needed? Should I try to link to several posts per thread, SF patches, etc.? That makes more work for me, but also makes the summary more useful. * Bi-weekly OK? I think it's a reasonable frequency. I'll check my e-mail tomorrow; if no one screams loudly, I'll post it. (My connectivity is poor enough that I don't want to do major editing on it, or be able to respond to many e-mails in detail.) ================== Python-dev summary, July 1-15, 2000: The 2-week period started with reactions to Guido's June 30 announcement that the 2.0b1 release would be delayed for an indefinite period due to legal wrangling. This gave everyone a second chance to contribute more patches while waiting for the release, and the activity level remained high. Two dominant issues for this time period were Unicode-related issues, and list comprehensions. The Unicode issues, as usual, turned on the question of where strings and Unicode strings should be interchangeable. A discussion in the thread "Minidom and Unicode" considered whether it's legal to return a Unicode string from __repr__. The consensus was that it should be legal, despite fears of breaking code that expects only an 8-bit string, and the CVS tree was patched accordingly. Python's interpreter mode uses repr() to display the results of expressions, and it will convert Unicode strings to ASCII, using the unicode-escape encoding. The following code, typed into the interpreter, will print 'abc\u3456'. class C: def __repr__(self): return u'abc\u3456' print repr( C() ) Hashing also presented a problem. As M.-A. Lemburg explained in http://www.python.org/pipermail/python-dev/2000-July/012150.html: The problem comes from the fact that the default encoding can be changed to a locale specific value (site.py does the lookup for you), e.g. given you have defined LANG to be us_en, Python will default to Latin-1 as default encoding. This results in 'äöü' == u'äöü', but hash('äöü') != hash(u'äöü'), which is in conflict with the general rule about objects having the same hash value if they compare equal. The resolution seems to be simply removing the ability to change the default encoding and adopt ASCII as the fixed default; if you want to use other encodings, you must specify them explicitly. List comprehensions originated as a patch from Greg Ewing that's now being kept up-to-date versus the CVS tree by Skip Montanaro. Originally they weren't on the roadmap for 1.6, but with the greater version number jump to 2.0, GvR is more willing to incorporate larger changes. List comprehensions provide a more concise way to create lists in situations where map() and filter() would currently be used. To take some examples from the patched-for-list-comphrensions version of the Python Tutorial:
spcs = [" Apple", " Banana ", "Coco nut "] print [s.strip() for s in spcs] ['Apple', 'Banana', 'Coco nut'] vec1 = [2, 4, 6] vec2 = [4, 3, -9] print [x*y for x in vec1 for y in vec2] [8, 6, -18, 16, 12, -36, 24, 18, -54]
A lengthy subthread about intuitiveness sprang from the second example, and from a patch from Thomas Wouters that implements parallel 'for' loops. The patch makes "for x in [1,2]; y in ['a','b']" cause x,y to be 1,'a', and then 2,'b'. The thread circulated around whether people would expect this syntax to produce the Cartesian product of the two lists: (1,'a'), (1, 'b'), (2, 'a'), (2, 'b'). No clear answer or final syntax has emerged yet, though Greg Wilson has been trying out syntaxes on Python-unaware people and asking them what they'd expect: http://www.python.org/pipermail/python-dev/2000-July/012810.html It was also suggested to add a new built-in function for parallel 'for' loops instead of new syntax, so you would code 'for x,y in zip([1,2], ['a','b']):'. A lengthy and very dull discussion ensued about the name 'zip': should it be 'plait', 'knit', 'parallel', or even 'marry'? Some new procedures for Python development were set out: Tim Peters wrote some guidelines for using SourceForge's patch manager: http://www.python.org/pipermail/python-dev/2000-July/012635.html Barry Warsaw announced a series of Python Extension Proposal (PEP) documents, which play the role of RFCs for significant changes to Python: http://www.python.org/pipermail/python-dev/2000-July/013059.html Mark Hammond gave the first glimpse of a fourth Python implementation: "This new compiler could be compared, conceptually, with JPython - it is a completely new implementation of Python. It has a compiler that generates native Windows .DLL/.EXE files. It uses a runtime that consists of a few thousand lines of C# (C-Sharp) code. The Python programs can be debugged at the source level with Visual Studio 7, as well as stand-alone debuggers for this environment. Python can sub-class VB or C# classes, and vice-versa." http://www.python.org/pipermail/python-dev/2000-July/013019.html Other bits: Skip Montanaro experimented with using code coverage tools to measure the effectiveness of the Python test suite, by seeing which lines of code (both C and Python) that are exercised by the tests. A summary of the results is at: http://www.musi-cal.com/~skip/python/Python/dist/src/summary.html Skip also added support to the readline module for saving and loading command histories. ESR suggested adding a standard lexer to the core, and /F suggested an extension to regular expressions that would make them more useful for tokenizing: http://www.python.org/pipermail/python-dev/2000-July/012032.html CVS problems were briefly a distraction, with dangling locks preventing commits to the Lib/ and Modules/ subdirectories for a few days. Despite such glitches, the move to SourceForge has accelerated development overall, as more people can make check-ins and review them. For some time Tim Peters has been suggesting removing the Py_PROTO macro and making the sources require ANSI C; mostly this is because the macro breaks the C cross-referencing support in Tim's editor. :) The ball finally started rolling on this, and snowballed into a massive set of patches to use ANSI C prototypes everywhere. Fred Drake and Peter Schneider-Kamp rose to the occasion and edited the prototypes in dozens of files. Jeremy Hylton pointed out that "Tuple, List, String, and Dict have a Py*_Size method. The abstract object interface uses PySequence_Length. This is inconsistent and hard to remember," and suggested that *_Size be made the standard form, and *_Length will be deprecated. Just before the cutoff date, Paul Prescod proposed a new help() function for interactive use, and began implementing it: http://www.python.org/pipermail/python-dev/2000-July/013346.html Huaiyu Zhu suggested adding new operators to support matrix math: http://www.python.org/pipermail/python-dev/2000-July/013364.html A slew of minor patches and bugfixes were made, too. Some highlights: * Ka-Ping Yee improved the syntax error messages. * ESR made various changes to ConfigParser.py * Some of Sam Rushing's patches from Medusa were applied to add os.setreuid() and friends; AMK is working on adding the poll() system call. * /F was his usual "patching machine" self, integrating PythonWin's win32popen function so that os.popen will now work correctly on Windows as well as Unix, writing PyErr_SafeFormat() to prevent buffer overflows, and proposing some patches to reduce the 600K size of the Unicode character database. Some fun posts came up during the near-endless zip()/plait()/whatever naming thread: http://www.python.org/pipermail/python-dev/2000-July/012920.html: "BTW: How comes, that Ping very often invents or introduces very clever ideas and concepts, but also very often chooses unclear names for them? Is it just me not being a native english speaker?" "I don't know. Perhaps my florx bignal zupkin isn't very moognacious?" -- Peter Funk and Ka-Ping Yee, 12 Jul 2000 http://www.python.org/pipermail/python-dev/2000-July/013050.html, while everyone was trying to think up alternative names for zip(): "Let me throw one more out, in honor of our fearless leader's recent life change: marry(). Usually only done in pairs, and with two big sequences, I get the image of a big Unification Church event :)" "Isn't it somewhat of a political statement to allow marriages of three or more items? I always presumed that this function was n-ary, like map." -- Barry Warsaw and Paul Prescod
I like it. I don't see anything about range literals, though. Probably buried in the list comp. discussion. I can't remember anything else you might have missed off the top of my head. I liked the part where someone asked: "What causes these CVS locks?" and Tim replied: "Skip, apparently." Luckily you cut off before I get zapped with a lightening bolt for checking in inappropriately. -- Paul Prescod - Not encumbered by corporate consensus Just how compassionate can a Republican get before he has to leave the GOP and join Vegans for Global Justice? ... One moment, George W. Bush is holding a get-to-know-you meeting with a bunch of gay Republicans. The next he is holding forth on education or the environment ... It is enough to make a red-blooded conservative choke on his spotted-owl drumstick. - April 29th, Economist
On Mon, 17 Jul 2000, Andrew Kuchling wrote:
Note: this is an experiment in whether I can make a useful, interesting, somewhat coherent summary of python-dev activity.
Very nice job! Well done. Thanks for doing all the work!
* Accuracy. I skipped past some threads such as the list comprehensions one, and may be unaware of a resolution.
As Paul mentioned, there was some talk about range literals. There was some stuff about augmented assignment too, i believe? Thomas Wouters tried to summarize the list-comp, parallel-iteration, and range-literal threads, to which i responded with an alternative proposal. Huaiyu Zhu also presented a fairly complete list-comp proposal (though i think the syntax is not quite implementable). Eric suggested adding a cross-platform "browse" routine to urllib. Some discussion ensued; some names for a separate module were proposed including "webbrowser.py"; some people suggested using the "start" command on Windows instead; i suggested a "launch" module for launching other kinds of external applications as well as web browsers; i don't remember if any resolution was reached. Paul started a small thread on automatic coercion of any type to string. There was some discussion of rearranging newsgroup and mailing list traffic, choosing more distinct purposes for comp.lang.python and python-dev, etc. A suggestion to make string.atoi work for negative bases was politely but quickly squashed. There were random gripes about SourceForge. Moshe suggested a file-copy routine that accepted objects; Greg Stein checked it in. Paul raised the issue of bringing an XPath implementation into Python. Paul made a fairly detailed proposal for an online help mechanism (this happened on July 15 at the end of your time window; more discussion ensued). -- ?!ng "Smoking kills. If you're killed, you've lost a very important part of your life." -- Brooke Shields
Ka-Ping Yee <pingster@ilm.com>:
Eric suggested adding a cross-platform "browse" routine to urllib. Some discussion ensued; some names for a separate module were proposed including "webbrowser.py"; some people suggested using the "start" command on Windows instead; i suggested a "launch" module for launching other kinds of external applications as well as web browsers; i don't remember if any resolution was reached.
Fred Drake coded up a new version after I critiqued the original. He and I agreed it was good, and we didn't see any -1s on adding it to the library. Fred, did you ever commit that sucker? -- <a href="http://www.tuxedo.org/~esr">Eric S. Raymond</a> The possession of arms by the people is the ultimate warrant that government governs only with the consent of the governed. -- Jeff Snyder
Thanks to everyone who made some suggestions. The more minor edits have been made, but I haven't added any of the threads I missed because doing a long stretch of Emacs editing in this lame Windows terminal program will drive me insane, so I just posted the summary to python-list. <rant>How is it possible for Microsoft to not get a VT100-compatible terminal program working correctly? VT100s have been around since, when, the 1970s? Can anyone suggest a Windows terminal program that *doesn't* suck dead bunnies through a straw?</rant> --amk
On Tue, Jul 18, 2000 at 10:13:21AM -0400, Andrew Kuchling wrote:
Thanks to everyone who made some suggestions. The more minor edits have been made, but I haven't added any of the threads I missed because doing a long stretch of Emacs editing in this lame Windows terminal program will drive me insane, so I just posted the summary to python-list.
<rant>How is it possible for Microsoft to not get a VT100-compatible terminal program working correctly? VT100s have been around since, when, the 1970s? Can anyone suggest a Windows terminal program that *doesn't* suck dead bunnies through a straw?</rant>
yes. I use "Tera Term Pro" with the SSH extensions. That gives me an excellent Telnet app, and it gives me SSH. I have never had a problem with it. [ initially, there is a little tweakiness with creating the "known_hosts" file, but you just hit "continue" and everything is fine after that. ] Tera Term Pro can be downloaded from some .jp address. I think there is a 16-bit vs 32-bit program. I use the latter. The SSL stuff is located in Oz, me thinks. I've got it on the laptop. Great stuff. Cheers, -g -- Greg Stein, http://www.lyra.org/
I can second Tera Term Pro. It is one of the few VT100 emulators that gets the emulation right. Many term program get the emulation wrong, often badly. If you do not have the docs for the VT series terminals a devo will not know the details of how the escape sequences should work and apps will fail. BArry (Ex DEC VT expert)
-----Original Message----- From: python-dev-admin@python.org [mailto:python-dev-admin@python.org]On Behalf Of Greg Stein Sent: 18 July 2000 20:42 To: python-dev@python.org Subject: [Python-Dev] Terminal programs (was: Python-dev summary: Jul 1-15)
On Tue, Jul 18, 2000 at 10:13:21AM -0400, Andrew Kuchling wrote:
Thanks to everyone who made some suggestions. The more minor edits have been made, but I haven't added any of the threads I missed because doing a long stretch of Emacs editing in this lame Windows terminal program will drive me insane, so I just posted the summary to python-list.
<rant>How is it possible for Microsoft to not get a VT100-compatible terminal program working correctly? VT100s have been around since, when, the 1970s? Can anyone suggest a Windows terminal program that *doesn't* suck dead bunnies through a straw?</rant>
yes.
I use "Tera Term Pro" with the SSH extensions. That gives me an excellent Telnet app, and it gives me SSH. I have never had a problem with it.
[ initially, there is a little tweakiness with creating the "known_hosts" file, but you just hit "continue" and everything is fine after that. ]
Tera Term Pro can be downloaded from some .jp address. I think there is a 16-bit vs 32-bit program. I use the latter. The SSL stuff is located in Oz, me thinks.
I've got it on the laptop. Great stuff.
Cheers, -g
-- Greg Stein, http://www.lyra.org/
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://www.python.org/mailman/listinfo/python-dev
On Tue, Jul 18, 2000 at 10:13:21AM -0400, Andrew Kuchling wrote:
Can anyone suggest a Windows terminal program that *doesn't* suck dead bunnies through a straw?</rant>
I like putty. You can do a google search for it or grab it off my website: http://www.enme.ucalgary.ca/~nascheme/putty.exe http://www.enme.ucalgary.ca/~nascheme/pscp.exe http://www.enme.ucalgary.ca/~nascheme/putty.zip It's a single exectutable that does telnet, SSH and raw TCP connections (very nice when your away from home). It sucks much less than the Windows telnet. Hmm, I wonder if MS was motivated to make logging into a Unix machine as painful as possible? Neil
On Tue, Jul 18, 2000 at 02:37:03PM -0600, Neil Schemenauer wrote:
On Tue, Jul 18, 2000 at 10:13:21AM -0400, Andrew Kuchling wrote:
Can anyone suggest a Windows terminal program that *doesn't* suck dead bunnies through a straw?</rant>
I like putty. You can do a google search for it or grab it off my website:
http://www.enme.ucalgary.ca/~nascheme/putty.exe http://www.enme.ucalgary.ca/~nascheme/pscp.exe http://www.enme.ucalgary.ca/~nascheme/putty.zip
It's a single exectutable that does telnet, SSH and raw TCP connections (very nice when your away from home). It sucks much less than the Windows telnet. Hmm, I wonder if MS was motivated to make logging into a Unix machine as painful as possible?
Well it also sucks when you're trying to connect to a MUD. Has nothing to do with Unix :-) Face it: their telnet just blows chunks... hehe... Cheers, -g -- Greg Stein, http://www.lyra.org/
On Mon, Jul 17, 2000 at 07:57:32PM -0400, Andrew Kuchling wrote:
List comprehensions originated as a patch from Greg Ewing that's now being kept up-to-date versus the CVS tree by Skip Montanaro. Originally they weren't on the roadmap for 1.6, but with the greater version number jump to 2.0, GvR is more willing to incorporate larger changes.
It may be worth mentioning that augmented assignment is also being considered for 2.0, and possibly other operators (we still haven't heard from Guido on that, I believe, and there was at least one +1 from Eric.) Also, maybe the outcome of small CNRI/BeOpen thread would be nice to mention? CNRI says they will release python 1.6, and python 2.0 will probably (possibly ?) be released by BeOpen after that ? -- Thomas Wouters <thomas@xs4all.net> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
participants (9)
-
Andrew Kuchling
-
Andrew Kuchling
-
Barry Scott
-
esr@thyrsus.com
-
Greg Stein
-
Ka-Ping Yee
-
Neil Schemenauer
-
Paul Prescod
-
Thomas Wouters