diff options
author | Alex Waygood <Alex.Waygood@Gmail.com> | 2024-09-25 19:29:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-25 19:29:58 (GMT) |
commit | 0d9d56c4e4246495f506f7fb319548fb105b535b (patch) | |
tree | 09751f896776408a53ab935c4426289ff3d43d59 /Doc/whatsnew/3.3.rst | |
parent | 6318ffcba21f8fc155f5558237ab03aa45f0e174 (diff) | |
download | cpython-0d9d56c4e4246495f506f7fb319548fb105b535b.zip cpython-0d9d56c4e4246495f506f7fb319548fb105b535b.tar.gz cpython-0d9d56c4e4246495f506f7fb319548fb105b535b.tar.bz2 |
gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (#124480)
Diffstat (limited to 'Doc/whatsnew/3.3.rst')
-rw-r--r-- | Doc/whatsnew/3.3.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index 95b89e7..f814c4e 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -549,9 +549,11 @@ separation of binary and text data). PEP 3155: Qualified name for classes and functions ================================================== -Functions and class objects have a new ``__qualname__`` attribute representing +Functions and class objects have a new :attr:`~definition.__qualname__` +attribute representing the "path" from the module top-level to their definition. For global functions -and classes, this is the same as ``__name__``. For other functions and classes, +and classes, this is the same as :attr:`~definition.__name__`. +For other functions and classes, it provides better information about where they were actually defined, and how they might be accessible from the global scope. |