[Python-Dev] Adding any() and all()
Guido van Rossum
gvanrossum at gmail.com
Fri Mar 11 16:19:56 CET 2005
> Even though you can use them as variables (and shadow the builtins), you
> will still get warnings from "pychecker".
So?
> The code will also be harder to
> read: When you see "all" in the middle of some code, you don't know if
> it's referring to the builtin or a variable.
Yes you do. Builtins will be followed by a '('; the variables won't.
(Obviously there can be exceptions, but in practice very, very few.)
> Personally, I think Python has too many builtins already.
It has fewer than most dynamic languages; and remember that I'm
trading product(), any(), all() for reduce(), map() and filter().
There are others slated for disappearance, too.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list