This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients
Date 2006-09-08.17:13:59
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=80475

Genexps necessarily need a separate stack frame to achieve
saved execution state (including the instruction pointer and
local variable).  Also, it was simplest to implement genexps
in terms of the existing and proven code for regular generators.

For list and set comps, I think you can take a simpler
approach and just rename the inner loop variable to
something invisible.  That will make it faster, make the
disassemby readable, and make it easier to follow in pdb. 
Also, we get to capitalize on proven code -- they only
difference is that the induction variable won't be visible
to surrounding code.

Since what you have works, I would say just check it in;
however, it would probably never get touched again and an
early, arbitrary design choice would get set in stone.  My
bet is that the renaming approach will result in a much
simpler patch.
History
Date User Action Args
2007-08-23 15:54:24adminlinkissue1548388 messages
2007-08-23 15:54:24admincreate