]> granicus.if.org Git - python/commit
Improve the implementation of itertools.product()
authorRaymond Hettinger <python@rcn.com>
Sat, 23 Feb 2008 02:20:41 +0000 (02:20 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 23 Feb 2008 02:20:41 +0000 (02:20 +0000)
commit73d796324242dc2164a0b5943bd08d6252a28651
tree3c1770c2ea596e727e3c69604033016d02ea1574
parentc5705a823bb200b48417677f8ef3ca6833ace4bb
Improve the implementation of itertools.product()

* Fix-up issues pointed-out by Neal Norwitz.
* Add extensive comments.
* The lz->result variable is now a tuple instead of a list.
* Use fast macro getitem/setitem calls so most code is in-line.
* Re-use the result tuple if available (modify in-place instead of copy).
Lib/test/test_itertools.py
Modules/itertoolsmodule.c