Mark Shannon added the comment:

Nathaniel, I'm hostile to this patch remaining in the code base.
I'm not hostile to you, sorry that I came across as that way.

The proper way to deal with issues like this is to revert the change and then 
create a new patch, otherwise it becomes impossible to revert the change if 
other problems emerge.

I agree that the bug in __class__ assignment should be fixed, but such a fix 
should be separate from adding any new features.

Also, I'm surprised that you assert that you can't do what your metamodule 
does, without ctypes.
Your metamodule package is almost there.

Your statement
"Depending on the relative order of the assignment to sys.modules and imports 
of submodules, you can end up with different pieces of code in the same program 
thinking that mymodule refers to one or the other of these objects."
is true.

So, just make sure that you insert the new object into sys.modules *before* 
doing any imports or calls to code that could import your module and it will 
all work fine.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24912>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to