[Python-Dev] Best way to specify docstrings for member objects (original) (raw)
Raymond Hettinger raymond.hettinger at gmail.com
Wed Mar 20 19:05:26 EDT 2019
- Previous message (by thread): [Python-Dev] Best way to specify docstrings for member objects
- Next message (by thread): [Python-Dev] Removing PendingDeprecationWarning
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mar 20, 2019, at 3:47 PM, Ivan Pozdeev via Python-Dev <python-dev at python.org> wrote:
NormalDist.mu.doc = 'Arithmetic mean' NormalDist.sigma.doc = 'Standard deviation' IMO this is another manifestation of the problem that things in the class definition have no access to the class object. Logically speaking, a definition item should be able to see everything that is defined before it.
The member objects get created downstream by the type() metaclass. So, there isn't a visibility issue because the objects don't exist yet.
Raymond
- Previous message (by thread): [Python-Dev] Best way to specify docstrings for member objects
- Next message (by thread): [Python-Dev] Removing PendingDeprecationWarning
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]