itertools comments [Was: Re: RELEASED: Python 2.3a2]
Jp Calderone
exarkun at intarweb.us
Fri Feb 21 22:11:54 EST 2003
On Fri, Feb 21, 2003 at 05:34:55PM -0800, Erik Max Francis wrote:
> Paul Rubin wrote:
>
> > Yuck, I didn't you could do that with xrange. It's surprising and
> > somewhat bizarre.
>
> Neither did I, although abstractly it makes sense. I doubt that this
> behavior is relied upon very much, though.
>
I use it a lot. Create one xrange object as a module attribute, then
iterate over that single object anywhere it is needed. Cuts the need for a
function call, and an allocation/deallocation pair.
Jp
--
http://catandgirl.com/view.cgi?44
--
up 13 days, 8:28, 4 users, load average: 0.02, 0.03, 0.00
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030221/4316df8d/attachment.sig>
More information about the Python-list
mailing list