[Python-checkins] cpython: #16832: s/integer/object/ in docs/docstring, and add whatsnew entry.

r.david.murray python-checkins at python.org
Tue Dec 24 22:14:11 CET 2013


http://hg.python.org/cpython/rev/a9f73b44ea0e
changeset:   88177:a9f73b44ea0e
user:        R David Murray <rdmurray at bitdance.com>
date:        Tue Dec 24 16:13:32 2013 -0500
summary:
  #16832: s/integer/object/ in docs/docstring, and add whatsnew entry.

files:
  Doc/library/abc.rst  |  6 +++---
  Doc/whatsnew/3.4.rst |  6 ++++++
  Lib/abc.py           |  6 +++---
  3 files changed, 12 insertions(+), 6 deletions(-)


diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst
--- a/Doc/library/abc.rst
+++ b/Doc/library/abc.rst
@@ -318,9 +318,9 @@
 
    Returns the current abstract base class cache token.
 
-   The token is an opaque integer identifying the current version of the
-   abstract base class cache for virtual subclasses. This number changes
-   with every call to :meth:`ABCMeta.register` on any ABC.
+   The token is an opaque object (that supports equality testing) identifying
+   the current version of the abstract base class cache for virtual subclasses.
+   The token changes with every call to :meth:`ABCMeta.register` on any ABC.
 
    .. versionadded:: 3.4
 
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
@@ -473,6 +473,12 @@
 Improved Modules
 ================
 
+abc
+---
+
+New function :func:`abc.get_cache_token` can be used to know when to invalidate
+caches that are affected by changes in the object graph.  (Contributed
+by Łukasz Langa in :issue:`16832`.)
 
 aifc
 ----
diff --git a/Lib/abc.py b/Lib/abc.py
--- a/Lib/abc.py
+++ b/Lib/abc.py
@@ -241,8 +241,8 @@
 def get_cache_token():
     """Returns the current ABC cache token.
 
-    The token is an opaque integer identifying the current version of
-    the ABC cache for virtual subclasses. This number changes with
-    every call to ``register()`` on any ABC.
+    The token is an opaque object (supporting equality testing) identifying the
+    current version of the ABC cache for virtual subclasses. The token changes
+    with every call to ``register()`` on any ABC.
     """
     return ABCMeta._abc_invalidation_counter

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


More information about the Python-checkins mailing list