(original) (raw)

changeset: 84356:34ff27b431d0 user: R David Murray rdmurray@bitdance.com date: Fri Jun 28 13:31:19 2013 -0400 files: Doc/whatsnew/3.4.rst description: #18111: Add What's New entry for max/min default. diff -r 6a0437adafbd -r 34ff27b431d0 Doc/whatsnew/3.4.rst --- a/Doc/whatsnew/3.4.rst Fri Jun 28 19:25:45 2013 +0200 +++ b/Doc/whatsnew/3.4.rst Fri Jun 28 13:31:19 2013 -0400 @@ -140,6 +140,9 @@ * Import now raises the new exception :exc:`ModuleNotFoundError` (subclass of :exc:`ImportError`) when it cannot find something. +* :func:`min` and :func:`max` now accept a *default* argument that can be used + to specify the value they return if the iterable they are evaluating has no + elements. Contributed by Julian Berman in :issue:`18111`. New Modules /rdmurray@bitdance.com