On Sunday 18 April 2004 08:45 am, John Belmonte wrote: > Perhaps this (but how could it be implemented?): > > class Foo(object): > __slots__ = docslots( > ('slot1': 'description'), > ('slot2': How about: class Foo(object): docslots(slot1='description', slot2=("Some really long\n" "multi-line description."), ...) The implementation for docslots() would either provide or update __slots__, and defining properities for slots with munged names. This wouldn't actually be difficult to implement, though is would require a sys._getframe() hack. In fact, you could crib from the attached sample. ;-) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation -------------- next part -------------- A non-text attachment was scrubbed... Name: docslots.py Type: text/x-python Size: 1169 bytes Desc: not available Url : http://mail.python.org/pipermail/python-dev/attachments/20040418/6aaee156/docslots.py
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