Skip Montanaro <skip at pobox.com>: > Had function attributes been available at that time the > special nature of "if the first object in the module/function/class is a > string literal, make it the docstring" wouldn't have been (as) > necessary. Maybe we could do with some more special cases concerning literals of other kinds? def foo(): {'author': "Guido", 'deprecated': 1} ... or def foo(): class __attributes__: author = "Guido" deprecated = 1 ... Everything inside these would have to be constant (if you want them computed at run time, you have to use the old fashioned method). Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
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