mirror of https://github.com/python/cpython
docs: Better wording for __objclass__ docs. Issue #19281
This commit is contained in:
parent
b9aa8cb0c7
commit
490a72e022
|
@ -1467,12 +1467,12 @@ class' :attr:`__dict__`.
|
||||||
Called to delete the attribute on an instance *instance* of the owner class.
|
Called to delete the attribute on an instance *instance* of the owner class.
|
||||||
|
|
||||||
|
|
||||||
The :attr:`__objclass__` is interpreted by the :mod:`inspect` module as
|
The attribute :attr:`__objclass__` is interpreted by the :mod:`inspect` module
|
||||||
specifying the class where this object was defined (setting this appropriately
|
as specifying the class where this object was defined (setting this
|
||||||
can assist in runtime introspection of dynamic class attributes). For callables,
|
appropriately can assist in runtime introspection of dynamic class attributes).
|
||||||
it may indicate that an instance of the given type (or a subclass) is expected
|
For callables, it may indicate that an instance of the given type (or a
|
||||||
or required as the first positional argument (for example, CPython sets this
|
subclass) is expected or required as the first positional argument (for example,
|
||||||
attribute for unbound methods that are implemented in C).
|
CPython sets this attribute for unbound methods that are implemented in C).
|
||||||
|
|
||||||
|
|
||||||
.. _descriptor-invocation:
|
.. _descriptor-invocation:
|
||||||
|
|
Loading…
Reference in New Issue