Message142016
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() |
|
Date |
User |
Action |
Args |
2011-08-13 07:52:10 | rhettinger | set | recipients:
+ rhettinger, amaury.forgeotdarc, pitrou, Peter.Saveliev |
2011-08-13 07:52:10 | rhettinger | set | messageid: <1313221930.15.0.44981926948.issue11866@psf.upfronthosting.co.za> |
2011-08-13 07:52:09 | rhettinger | link | issue11866 messages |
2011-08-13 07:52:09 | rhettinger | create | |
|