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 arigo
Recipients
Date 2004-01-11.11:07:21
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=4771

Here is a safer patch.  It adds a keyword argument 'iter' to range(), e.g.:

>>> range(10, iter=True)
<rangeiterator object at xxx>

and using an appropriate METH_XXX flag, the CALL_FUNCTION opcode now inserts a 'iter=True' keyword to the call when it is followed by GET_ITER.

The patch doesn't live up to its performance promizes.  I don't get any improvement at all on any real application.  The only example it accelerates is a set of three nested loops :-(

I still attach it for reference, and if someone else want to play with it.
History
Date User Action Args
2007-08-23 15:27:14adminlinkissue738094 messages
2007-08-23 15:27:14admincreate