Aahz <aahz at pythoncraft.com> writes: >> def pairswap(iterable): >> return ((b,a) for a,b in iterable) > > -1 -- too trivial. Yeah, shouldn't any sequence-returning functions in itertools really be returning an iterator adaptor? After all, what if iterable is reading from a file? What we need is a lazy views library. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
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