[Python-Dev] objclass documentation (original) (raw)

Ethan Furman ethan at stoneleaf.us
Sun Oct 13 09:27:50 CEST 2013


On 10/12/2013 11:18 PM, Cameron Simpson wrote:

On 12Oct2013 15:03, Ethan Furman <ethan at stoneleaf.us> wrote:

It was pointed in Issue16938[1] that objclass is not documented anywhere.

Is the following an appropriate description? (in Doc/reference/datamodel.rst in user-defined functions) +-------------------------+-------------------------------+-----------+ | :attr:_objclass_ | The class this object belongs | | | | to; useful when the object is | | | | a descriptor, or a virtual or | | | | dynamic class attribute, and | | | | it's class attribute does | | "its" please. Like "his", "her", "their".

Right.

| | not match the class it is | | | | associated with, or it is not | | | | in that class' _dict_. | | +-------------------------+-------------------------------+-----------+ [1] http://bugs.python.org/issue16938 I'd make this two sentences. Just turn the semicolon into a full stop, and commence "This is useful when". I had trouble with the end. How about: or it is not in class.dict Do I misunderstand?

You have it right. Good change.

-- Ethan



More information about the Python-Dev mailing list