Daniel Urban <urban.dani...@gmail.com> added the comment:

I'm attaching the updated patch.  Changes:
- Special casing objects we can't do the metaclass computation for.
- Tests for these.
- Adding tests for the order of __new__ calls.

The special case isn't just checking if the object is a class, but instead 
checking if "isinstance(obj, type) and issubclass(obj, type)", because I think 
only these are the objects we can do the metaclass calculation for.  All other 
objects (including classes which are not "real" metaclasses (they do not derive 
from type) and functions) are used "as is", without any metaclass calculation.  
(It's late here, so it is quite possible that I've overlooked someting in this 
part.)

(I'm using "hg extdiff" because the normal hg diff results in a longer and 
harder to read patch, but if it's needed I will send a normal diff.)

----------
Added file: http://bugs.python.org/file21754/issue_1294232_3.patch

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

Reply via email to