[Python-Dev] defaultdict and on_missing()
raymond.hettinger at verizon.net
Wed Mar 1 00:28:38 CET 2006
> I'd still like to see next(x) / x.__next__() in
> some form in 3.0 for the sake of consistency,
+1 on modifying next() in Py3.0 to accept the send argument.
-1 on the silly renaming to __next__ and adding __builtin__.next().
We have len() because it applies to many different object types.
In contrast, next() would apply only to iterables.
Foolish consistency is a somewhat weak reason to add a built-in.
Also, calls to it.next() need to be as fast as possible.
Adding a layer of indirection through __builtin__.next() is a waste.
More information about the Python-Dev