Fred L. Drake, Jr. wrote:
How about:
class Foo(object): docslots(slot1='description', slot2=("Some really long\n" "multi-line description."), ...)
My intention was to make something that can completely replace the current __slots__ pattern. Your proposal doesn't support slots that don't have a docstring very naturally (you'd use slot=''). Attached is another strategy that uses optional tuples. Combined with my pydoc patch, class Foo(object): slots( ('slot1', 'description'), ('slot2', """description ...continued"""), 'slot3', ('_slot4', 'hidden'), ) yields this help: class Foo(__builtin__.object) | Data descriptors defined here: | | slot1 | description | slot2 | description | ...continued | slot3 -John -- http:// if ile.org/