-----Original Message----- From: Tim Peters [mailto:tim@zope.com] Sent: Friday, March 08, 2002 1:05 AM To: python-announce@python.org; Python list Subject: PEP Parade Quoting Guido's new "Parade of the PEPs" essay at http://www.python.org/doc/essays/pepparade.html """ To start off Developer's Day at the Python10 conference I gave a keynote ending in what I dubbed "the parade of the PEPs". It was a brief overview of all open PEPs, where I gave my highly personal and subjective opinion for each PEP. Later, I realized that this might have been of interest to other developers. I didn't take notes at the conference, so below is a different set of comments that I created from scratch during a single two-hour sitting on March 7, 2002. """ Since Guido's "highly personal and subjective opinions" are nevertheless destined to circumscribe every waking moment of your Python life, everyone interested in Python development should give it a good read. It's also linked to from the PEP Index page at SourceForge: http://python.sf.net/peps/ Note that Guido wants to keep 2.3 free of new core language features. You can deduce that from reading the essay, or-- like me --you can just believe it because it's true <wink>. There's a huge backlog of good ideas for improving the internals and libraries, and I wouldn't be surprised to see the focus remain there for 2.4 too.
After reading the Parade of the PEPs, i looked at PEP 284, which proposes yet another solution to for-loop iteration over integers. This caused me to go back and look at all the other proposals for this problem: PEP 204, PEP 212, PEP 276, and PEP 281. For me, PEP 204 stands out as the nicest and most straightforward solution. My answers to the Open Issues in PEP 204 would be: Q. Should [x:y] produce a generator? A. Not in the general case. However, when it appears as a literal in a "for" statement, the compiler is free to replace it with an xrange object or generator without any visible effect (except better performance). Q. Should it be possible to mix range syntax with list literals? For example, [5, 6, 1:6, 7] becomes [5, 6, 1, 2, 3, 4, 5, 7]. A. No. Q. Should it be possible to concatenate ranges in list comprehensions? For example, [x:4 for x in (1, 2)] becomes [1, 2, 3, 2, 3]. A. No. Q. Should range literals accept objects other than integers? For example, ['a':'e'] becomes ['a', 'b', 'c', 'd']. A. No. PEP 204 mentions that it was rejected but doesn't provide much explanation for its rejection; could this be elaborated upon? -- ?!ng
participants (2)
-
Ka-Ping Yee
-
Tim Peters