top | item 45070829

(no title)

akssri | 6 months ago

This doesn't work the moment the module you're importing something imports something else that you've changed.

Worse, you can't redine methods, because the classes get "redefined". This means that you need to first redefine classes, then "reload" (hoping it doesn't break for to silly implementation limitations mentioned above), then initialize objects, then retest.

Obviously this is quite painful which is why I use this decorator to mimic Lisp's defmethod to patch methods on "live" objects without class redefinition,

https://gist.github.com/akssri/431f2dfe037bbdbb3c8668872edfd...

discuss

order

aidenn0|6 months ago

That's a really neat decorator.