Dictionary Comprehension
Aahz
aahzpy at panix.com
Wed Mar 20 13:34:32 EST 2002
In article <7xsn6w9pad.fsf at ruckus.brouhaha.com>,
Paul Rubin <phr-n2002a at nightsong.com> wrote:
>
>Also, if adding dict comprehensions really require "major hacking in
>the parser, the bytecode compiler, and the virtual machine", then IMO
>a code cleanup is needed that's much larger in scope than adding one
>feature. Certainly no change to the VM should be needed at all, since
>the dict comprehension is equivalent to a for loop, and the compiler
>can generate the exact same code as the for loop would have. The
>parser and compiler would need a patch, but I'd hope it wouldn't be
>"major hacking".
"In theory, there is no difference between theory and practice. But, in
practice, there is." --Jan L.A. van de Snepscheut
As it happens, though, part of the work planned for 2.3 is to start
doing some cleanup work.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
The best way to get information on Usenet is not to ask a question, but
to post the wrong information. --Aahz
More information about the Python-list
mailing list