[Python-checkins] cpython: whatsnew: frozen package __path__; and min/max versionadded.

r.david.murray python-checkins at python.org
Sat Feb 22 21:06:23 CET 2014


http://hg.python.org/cpython/rev/0695e465affe
changeset:   89323:0695e465affe
user:        R David Murray <rdmurray at bitdance.com>
date:        Sat Feb 22 15:05:08 2014 -0500
summary:
  whatsnew: frozen package __path__; and min/max versionadded.

files:
  Doc/library/functions.rst |   6 ++++++
  Doc/whatsnew/3.4.rst      |  13 ++++++++++---
  2 files changed, 16 insertions(+), 3 deletions(-)


diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -781,6 +781,9 @@
    such as ``sorted(iterable, key=keyfunc, reverse=True)[0]`` and
    ``heapq.nlargest(1, iterable, key=keyfunc)``.
 
+   .. versionadded:: 3.4
+      The *default* keyword-only argument.
+
 
 .. _func-memoryview:
 .. function:: memoryview(obj)
@@ -812,6 +815,9 @@
    such as ``sorted(iterable, key=keyfunc)[0]`` and ``heapq.nsmallest(1,
    iterable, key=keyfunc)``.
 
+   .. versionadded:: 3.4
+      The *default* keyword-only argument.
+
 .. function:: next(iterator[, default])
 
    Retrieve the next item from the *iterator* by calling its
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -346,9 +346,10 @@
 
 * Unicode database updated to UCD version 6.3.
 
-* :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`.
+* :func:`min` and :func:`max` now accept a *default* keyword-only 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`.)
 
 * Module objects are now :mod:`weakref`'able.
 
@@ -1805,6 +1806,12 @@
   similarly to ``__kwdefaults__``. (Contributed by Yury Selivanov in
   :issue:`20625`).
 
+* Frozen packages used to have their ``__path__`` set to the package name,
+  but this could cause the import system to do the wrong thing on submodule
+  imports if there was also a directory with the same name as the frozen
+  package.  The ``__path__`` for frozen packages is now set to ``[]``
+  (:issue:`18065`).
+
 
 Changes in the C API
 --------------------

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list