3 ms·
Why would you want that when you have actual metaprogramming on code-as-data in the standard library?
by nerdponx 9y ago
Why would you want that when you have actual metaprogramming on code-as-data in the standard library?
- fulafel 9y agoIs this a joke on the namedtuple trick or is there actually such a module in the standard library?
- nerdponx 9y agoNot a joke, but "code as data" was hyperbolic. You can do some pretty amazing metaprogramming in Python with metaclasses, and the inspect and ast modules give you access to the guts of the language.