Yet another variant that deals with "passive" metadata: make the first dictionary special just like the first string. >>> def foobar(): ... { author = "van Rossum", ... deprecated = True } ... >>> foobar.deprecated True Even better, stash it all away in a another attribute: >>> foobar.__meta__ {"author": "van Rossum", "deprecated": "not yet"} This would work for both functions and classes. Fitting in nicely: the alternative spelling for all dictionaries: {alpha="value", beta="another value"} Peter Otten
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