Nick Coghlan wrote: > I actually hope that extended function call syntax in Py3k will > use iterators rather than tuples so that this problem goes away. I suggested this a while back on the Python list: http://mail.python.org/pipermail/python-list/2004-December/257282.html Raymond Hettinger brought up a few pretty valid complaints, the biggest of which is that a lot of code now expects *args to be sequences, not iterators. For example, the code you posted on the Wiki[1] would break: def write(*args, **kwds): ... # may break if args iterator does not have a __len__ if not args: return ... # will break unless "args = tuple(args)" precedes it stream.write(str(args[0])) for arg in args[1:]: stream.write(sep) stream.write(str(arg)) This code would have to be rewritten to use the iterator's .next() method and try/excepts for StopIterations. It's not particularly hard, but people would have to do some relearning about *args. [1] http://wiki.python.org/moin/PrintAsFunction STeVe -- You can wordify anything if you just verb it. --- Bucky Katt, Get Fuzzy
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