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 Peter.Saveliev, amaury.forgeotdarc, pitrou, rhettinger
Date 2011-08-13.07:52:09
SpamBayes Score 0.0010372987
Marked as misclassified No
Message-id <1313221930.15.0.44981926948.issue11866@psf.upfronthosting.co.za>
In-reply-to
Content
I think the patch is correct.

FWIW, my style is to prebind the next method, making the counter completely self-contained (like a closure):

+_counter = itertools.count().next
 def _newname(template="Thread-%d"):
     global _counter
-    _counter = _counter + 1
-    return template % _counter
+    return template % _counter()
History
Date User Action Args
2011-08-13 07:52:10rhettingersetrecipients: + rhettinger, amaury.forgeotdarc, pitrou, Peter.Saveliev
2011-08-13 07:52:10rhettingersetmessageid: <1313221930.15.0.44981926948.issue11866@psf.upfronthosting.co.za>
2011-08-13 07:52:09rhettingerlinkissue11866 messages
2011-08-13 07:52:09rhettingercreate