Message331455
> 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. |
|
Date |
User |
Action |
Args |
2018-12-09 23:35:52 | steven.daprano | set | recipients:
+ steven.daprano, stefan, xtreak |
2018-12-09 23:35:52 | steven.daprano | link | issue35449 messages |
2018-12-09 23:35:52 | steven.daprano | create | |
|