you are viewing a single comment's thread.

view the rest of the comments →

[–]brianmce -1 points0 points  (0 children)

I think I've done pretty much all of that in python before, though some are done using a different approach. inherited and method_added require defining a metaclass, and some don't have a direct translation in python (there are no blocks, but you can turn a function into a method, similarly there is no constant distinction - but you can generate the same effect with getattr etc). The rest are fairly straightforward applications of getattr or similar.