Robert> However, the idea of putting such attributes at the same level Robert> as the rest of the function block is ugly to me--newbies are Robert> going to go mad the first few times, trying to figure out *when* Robert> such statements are evaluated. An excellent point. It seems to me that @statements would have to be restricted to occur only at the beginning of a function (immediately after the def line or the docstring). If not, you'll probably get people (newbies at least) trying to write stuff like this: def foo(a): if a > 5: @attr: "bob" elif a > 0: @attr: "skip" else: @attr: "guido" The other forms (via a decorator, using explicit attribute assignments after the definition) make it explicit that these attribute assignments don't occur in the context of function execution. Skip
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