Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3edcc783
Commit
3edcc783
authored
Dec 24, 2013
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#16832: s/integer/object/ in docs/docstring, and add whatsnew entry.
parent
5ea95249
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
Doc/library/abc.rst
Doc/library/abc.rst
+3
-3
Doc/whatsnew/3.4.rst
Doc/whatsnew/3.4.rst
+6
-0
Lib/abc.py
Lib/abc.py
+3
-3
No files found.
Doc/library/abc.rst
View file @
3edcc783
...
...
@@ -318,9 +318,9 @@ The :mod:`abc` module also provides the following functions:
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
...
...
Doc/whatsnew/3.4.rst
View file @
3edcc783
...
...
@@ -473,6 +473,12 @@ trace memory blocks allocated by Python. It provides the following information:
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
----
...
...
Lib/abc.py
View file @
3edcc783
...
...
@@ -241,8 +241,8 @@ class ABC(metaclass=ABCMeta):
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment