[issue36326] Build-out help() to read __slots__ with an optional data dictionary

2019-03-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +12448 stage: -> patch review ___ Python tracker ___ ___

[issue36326] Build-out help() to read __slots__ with an optional data dictionary

2019-03-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: The direct assignments to __doc__ are reasonable for named tuples because there usually isn't any code between the factory function call and the __doc__ assignments. For other classes, the technique is awkward because it widely separates the initial

[issue36326] Build-out help() to read __slots__ with an optional data dictionary

2019-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not sure that this is the best application of dict as __slots__. Maybe use dict for specifying default values? Currently slots are not compatible with class-level values used as fallbacks. Following the pattern for namedtuple attributes, docstrings

[issue36326] Build-out help() to read __slots__ with an optional data dictionary

2019-03-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36326] Build-out help() to read __slots__ with an optional data dictionary

2019-03-17 Thread Raymond Hettinger
New submission from Raymond Hettinger : The __slots__ variable already works with dictionaries. The values are simply ignored. I propose teaching help() to read those optional dictionaries to give better information on member objects (much like we already have with property objects). This