Skip Montanaro wrote: > Guido> (For those worried that the function attribute > sets appear to > Guido> belong to the body, I point to the precedent of > the docstring. > Guido> IMO the start of the function body is a perfectly > fine place for > Guido> metadata about a function.) > > The docstring is a bit of a different beast. They were added > before general > function attributes, right? As such, they are a partial > solution to a more > general problem. 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. I can just picture the article: "Unifying functions and classes in Python 2.5" Introduction "Python 2.5 introduces the first phase of "function/class unification". This is a series of changes to Python intended to remove most of the differences between functions and classes. Perhaps the most obvious one is the restriction against declaring attributes of functions (such as docstrings and other metadata) in a 'def' statement..." :D Robert Brewer MIS Amor Ministries fumanchu at amor.org
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