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

You could normally do this with copy.copy or copy.deepcopy but apparently you can't pickle a module object... A quick internet search does not immediately reveal anybody trying to do this before, and I am surprised.


> apparently you can't pickle a module object

Not with the standard library pickle, but "dill extends python’s pickle module for serializing and de-serializing python objects to the majority of the built-in python types".

https://pypi.org/project/dill/




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

Search: