Author serhiy.storchaka
Recipients rhettinger, serhiy.storchaka, xtreak
Date 2019-03-17.12:50:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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 for slots could be specified as:

class Bicycle:
       __slots__ = 'category', 'model', 'size', 'price'

Bicycle.category.__doc__ = 'Primary use: road, cross-over, or hybrid'
Bicycle.model.__doc__ = 'Unique six digit vendor-supplied code'
Bicycle.size.__doc__ = 'Rider size: child, small, medium, large, extra-large'
Bicycle.price.__doc__ = 'Manufacturer suggested retail price'
Date User Action Args
2019-03-17 12:50:23serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, xtreak
2019-03-17 12:50:22serhiy.storchakasetmessageid: <>
2019-03-17 12:50:22serhiy.storchakalinkissue36326 messages
2019-03-17 12:50:22serhiy.storchakacreate