Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix dump_module() bugs and rename parameter 'main' to 'module' (#526)
* fix dump_module() bugs and rename parameter 'main' to 'module' (fixes #525) New phrasing of mismatching modules error messages in load_session(): ```python >>> import dill >>> dill.dump_module() >>> dill.load_module(module='math') ValueError: can't update module 'math' with the saved state of module '__main__' >>> import types >>> main = types.ModuleType('__main__') >>> dill.load_module(module=main) ValueError: can't update module-type object '__main__' with the saved state of imported module '__main__' >>> dill.dump_module(module=main) >>> dill.load_module(module='__main__') ValueError: can't update imported module '__main__' with the saved state of module-type object '__main__' ``` * dump_module: clarify refimport description * improvements to 'refimported' handling and extra checks in *_module() functions * load_session(): clarify that the 'module' argument must match the session file's module
- Loading branch information