[Python-ideas] 'default' keyword argument for max(), min()

Raymond Hettinger python at rcn.com
Fri Apr 17 02:20:00 CEST 2009


> The discussion has indeed sidetracked with handling the special cases,
> signature definition and whatnot, 

Does the following code emit 10 or -10?

    print(min([], default=10, key=operator.neg))


Raymond





More information about the Python-ideas mailing list