[Python-checkins] cpython (3.4): docs: Document __objclass__. Closes #19281.

Ethan Furman ethan at stoneleaf.us
Tue Apr 8 18:33:30 CEST 2014


On 04/08/2014 09:07 AM, yury.selivanov wrote:
> http://hg.python.org/cpython/rev/0973d45197cc
 >
> +The :attr:`__objclass__` is interpreted by the :mod:`inspect` module as
> +specifying the class where this object was defined (setting this appropriately
> +can assist in runtime introspection of dynamic class attributes). For callables,
> +it may indicate that an instance of the given type (or a subclass) is expected
> +or required as the first positional argument (for example, CPython sets this
> +attribute for unbound methods that are implemented in C).

This would read better as

The attribute :attr:`__objclass__` . . .

--
~Ethan~



More information about the Python-checkins mailing list