4 ms·
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 cla
by akssri 1y 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/431f2dfe037bbdbb3c8668872edfd13e https://gist.github.com/akssri/431f2dfe037bbdbb3c8668872edfd...
- aidenn0 1y agoThat's a really neat decorator.