From: "Skip Montanaro" <skip@pobox.com> > >> * loopzip() - It's not clear why its next() method should return a > >> list instead of a tuple (again, a seemingly needless distiction > >> with its builtin counterpart, zip()). > > Raymond> I've wrestled with the one. The short answer is that zip() > Raymond> already does a pretty good job and that the only use for > Raymond> loopzip() is super high speed looping. To that end, reusing a > Raymond> single list instead of allocating and building tuples is *much* > Raymond> faster. > > How do you know the caller doesn't squirrel away the list you returned on > the n-th iteration? I don't see how you can safely reuse the same list. After more thought, I think loopzip() is too unsavory and taints an otherwise clean package, so I'll take it out unless someone wants to stand-up for it. Too bad, it was an exceptionally fast solution to the lock-step iteration problem. Raymond
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4