A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2019-March/156790.html below:

[Python-Dev] Best way to specify docstrings for member objects

[Python-Dev] Best way to specify docstrings for member objects [Python-Dev] Best way to specify docstrings for member objectsRaymond Hettinger raymond.hettinger at gmail.com
Wed Mar 20 19:17:13 EDT 2019
> On Mar 20, 2019, at 3:59 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> 
> Hmm.  Said somewhat less snarkily, is there a more general solution to the problem of absent docstrings or do we have to attack this problem piece-by-piece?

I think this is the last piece.  The pydoc help() utility already knows how to find docstrings for other class level descriptors:  property, class method, staticmethod.

Enum() already has nice looking help() output because the class variables are assigned values that have a nice __repr__, making them self documenting.

By design, dataclasses aren't special -- they just make regular classes, similar to or better than you would write by hand.


Raymond
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4