Author: Mark Young <marky1...@gmail.com> Branch: fix_magic_reload Changeset: r82603:a63321cb4f25 Date: 2016-02-27 09:08 -0500 http://bitbucket.org/pypy/pypy/changeset/a63321cb4f25/
Log: Rename the parameter to something (hopefully) more clear. diff --git a/pypy/interpreter/mixedmodule.py b/pypy/interpreter/mixedmodule.py --- a/pypy/interpreter/mixedmodule.py +++ b/pypy/interpreter/mixedmodule.py @@ -57,7 +57,7 @@ if not self.lazy and self.w_initialdict is None: self.save_module_content_for_future_reload() - def save_module_content_for_future_reload(self, force_override=False): + def save_module_content_for_future_reload(self, save_all=False): # Because setdictvalue is unable to immediately load all attributes # (due to an importlib bootstrapping problem), this method needs to be # able to support saving the content of a module's dict without @@ -69,7 +69,9 @@ w_items = self.space.iteriterable(self.space.call_method(self.w_dict,'items')) for w_item in w_items: w_key, w_value = self.space.fixedview(w_item, expected_length=2) - if force_override or not self.space.is_true(self.space.contains(self.w_initialdict, w_key)): + if save_all or not self.space.is_true( + self.space.contains(self.w_initialdict, + w_key)): self.space.setitem(self.w_initialdict, w_key, w_value) else: self.w_initialdict = self.space.call_method(self.w_dict, 'copy') diff --git a/pypy/module/__pypy__/interp_magic.py b/pypy/module/__pypy__/interp_magic.py --- a/pypy/module/__pypy__/interp_magic.py +++ b/pypy/module/__pypy__/interp_magic.py @@ -130,7 +130,7 @@ @unwrap_spec(w_module=MixedModule) def save_module_content_for_future_reload(space, w_module): - w_module.save_module_content_for_future_reload(force_override=True) + w_module.save_module_content_for_future_reload(save_all=True) def set_code_callback(space, w_callable): cache = space.fromcache(CodeHookCache) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit