[Python-checkins] r71138 - python/branches/py3k/Doc/whatsnew/3.1.rst

raymond.hettinger python-checkins at python.org
Sat Apr 4 13:08:49 CEST 2009


Author: raymond.hettinger
Date: Sat Apr  4 13:08:48 2009
New Revision: 71138

Log:
More updates to whatsnew

Modified:
   python/branches/py3k/Doc/whatsnew/3.1.rst

Modified: python/branches/py3k/Doc/whatsnew/3.1.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/3.1.rst	(original)
+++ python/branches/py3k/Doc/whatsnew/3.1.rst	Sat Apr  4 13:08:48 2009
@@ -189,6 +189,28 @@
 
   (Contributed by Raymond Hettinger and Mark Dickinson.)
 
+* The fields in :func:`format` strings can now be automatically
+  numbered::
+
+    >>> 'Sir {} of {}'.format('Gallahad', 'Camelot')
+    'Sir Gallahad of Camelot'
+
+  Formerly, the string would have required numbered fields such as:
+  ``'Sir {0} of {1}'``.
+
+  (Contributed by Eric Smith; :issue:`5237`.)
+
+* The :mod:`itertools` module grew two new functions.  The
+  :func:`itertools.combinations_with_replacement` function is one of
+  four for generating combinatorics including permutations and Cartesian
+  products.  The :func:`itertools.compress` function mimics its namesake
+  from APL.  Also, the existing :func:`itertools.count` function now has
+  an optional *step* argument and can accept any type of counting
+  sequence including :class:`fractions.Fraction` and
+  :class:`decimal.Decimal`.
+
+  (Contributed by Raymond Hettinger.)
+
 
 .. ======================================================================
 
@@ -213,6 +235,13 @@
 
   (Contributed by Antoine Pitrou, :issue:`4753`.)
 
+* Add a heuristic so that tuples and dicts containing only untrackable objects
+  are not tracked by the garbage collector. This can reduce the size of
+  collections and therefore the garbage collection overhead on long-running
+  programs, depending on their particular use of datatypes.
+
+  (Contributed by Antoine Pitrou, :issue:`4688`.)
+
 XXX The JSON module is getting a C extension for speed.
 
 .. ======================================================================


More information about the Python-checkins mailing list