Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why would you want that when you have actual metaprogramming on code-as-data in the standard library?


Is this a joke on the namedtuple trick or is there actually such a module in the standard library?


Not 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: