Author steven.daprano
Recipients stefan, steven.daprano, xtreak
Date 2018-12-09.23:35:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20181209233450.GX13061@ando.pearwood.info>
In-reply-to <1544397106.35.0.788709270274.issue35449@psf.upfronthosting.co.za>
Content
> Is there any discussion concerning what syntax might be used for 
> docstrings associated with objects ?

I don't know about PyDoc in general, but I would expect help(obj) to 
just use obj.__doc__ which will return the instance docstring if it 
exists, and if not, the type docstring (if it exists). No new syntax is 
required, the standard ``help(obj)`` is sufficient.

> (There seem to be some partial 
> solutions added on top of the Python parser (I think `epydoc` offered 
> one), but it would be nice to have a built-in solution to avoid having 
> to re-invent wheels.

Are you suggesting we need new syntax to automatically assign docstrings 
to instances? I don't think we do.

I expect that if you want to set a custom instance docstring, you would 
just say ``instance.__doc__ = "The doc string"`` after creating the 
instance, or ``self.__doc__ = "..."`` inside the __init__ method.
History
Date User Action Args
2018-12-09 23:35:52steven.dapranosetrecipients: + steven.daprano, stefan, xtreak
2018-12-09 23:35:52steven.dapranolinkissue35449 messages
2018-12-09 23:35:52steven.dapranocreate