On 02/25/2016 08:20 AM, Dan Stromberg wrote:

My intuition is telling me that "module.data; module.data.mutate()"
would be easier to monkey patch in a way that all modules will see.
Is that fair to say?

It is fair to say that if you need to monkey-patch a module, you should import the module. :)

You should also import it before anything else does to make sure your change is visible to all other code.

--
~Ethan~

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to