RyanKung / assign

A Black Magic for support obj.__assign__ method'

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The README is unclear about usage

ktbarrett opened this issue · comments

The README's example works (import magic should be import assign.magic), but it doesn't explain what you can't do. After trying the examples I tried putting the import assign.magic statement in the file with the __assign__ overloads, only to find that they didn't work. I realize why now. The instructions should mention that because this has to modify the AST that you must import assign.magic before you import the user code, it won't work if the code has already been compiled. It might save people a few minutes of headache.