diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-25 17:56:07 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-25 17:56:07 (GMT) |
commit | 86a36b500a7f7581194382ce4df914e4bb487873 (patch) | |
tree | 0d83f90f9a14d40d3559ae188c203e9c8941c6db /Doc/glossary.rst | |
parent | 0e86a5842d0fadff37c299e8a1c03535c6727b19 (diff) | |
download | cpython-86a36b500a7f7581194382ce4df914e4bb487873.zip cpython-86a36b500a7f7581194382ce4df914e4bb487873.tar.gz cpython-86a36b500a7f7581194382ce4df914e4bb487873.tar.bz2 |
PEP 3155 / issue #13448: Qualified name for classes and functions.
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r-- | Doc/glossary.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 04b3fbb..f5ca0d9 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -544,6 +544,24 @@ Glossary for piece in food: print(piece) + qualified name + A dotted name showing the "path" from a module's global scope to a + class, function or method defined in that module, as defined in + :pep:`3155`. For top-level functions and classes, the qualified name + is the same as the object's name:: + + >>> class C: + ... class D: + ... def meth(self): + ... pass + ... + >>> C.__qualname__ + 'C' + >>> C.D.__qualname__ + 'C.D' + >>> C.D.meth.__qualname__ + 'C.D.meth' + reference count The number of references to an object. When the reference count of an object drops to zero, it is deallocated. Reference counting is |