New submission from Raymond Hettinger <[email protected]>:
class Bicycle:
__data_dictionary__ = dict(
category = 'Primary use: road, cross-over, or hybrid',
model = 'Unique six digit vendor-supplied code',
size = 'Rider size: child, small, medium, large, extra-large',
price = 'Manufacturer suggested retail price',
)
>>> help(Bicycle)
class Bicycle(builtins.object)
| Data fields defined here:
|
| category
| Primary use: road, cross-over, or hybrid
|
| model
| Unique six digit vendor-supplied code
|
| size
| Rider size: child, small, medium, large, extra-large
|
| price
| Manufacturer suggested retail price
|
| ----------------------------------------------------------------------
|
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __data_dictionary__ = {'category': 'Primary use: road, cross-over, or .
----------
components: Library (Lib)
messages: 338121
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Build-out help() to support a class level data dictionary
versions: Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36325>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com