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 belopolsky, jameinel, rhettinger
Date 2008-04-24.21:24:48
SpamBayes Score 0.006256418
Marked as misclassified No
Message-id <1209072289.81.0.669976050802.issue2672@psf.upfronthosting.co.za>
In-reply-to
Content
John, when y=[], the update method has to create a new list iterator on 
each invocation.  But when y is a genexp, it is self-iterable (iow, iter
(y) will return self, not a new object).

Also, when doing timings, it can be helpful to factor-out the attribute 
lookup:

python -m timeit -s 'x=set(range(10000)); y=[]; xu=x.update' 'xu(y)'
History
Date User Action Args
2008-04-24 21:24:50rhettingersetspambayes_score: 0.00625642 -> 0.006256418
recipients: + rhettinger, belopolsky, jameinel
2008-04-24 21:24:49rhettingersetspambayes_score: 0.00625642 -> 0.00625642
messageid: <1209072289.81.0.669976050802.issue2672@psf.upfronthosting.co.za>
2008-04-24 21:24:48rhettingerlinkissue2672 messages
2008-04-24 21:24:48rhettingercreate