[Python-3000] Could isinstance/issubclass overriding be dangerous? (original) (raw)

Phillip J. Eby pje at telecommunity.com
Mon Apr 30 17:16:34 CEST 2007


At 01:48 PM 4/30/2007 +1200, Greg Ewing wrote:

Currently, isinstance(x, C) implies that the C struct layout of x is compatible with that defined by C.

No, it doesn't, and hasn't since Python 2.3.

I'm worried that changing this could cause difficulties for extension modules that use PyObjectIsInstance do decide what to do with things, e.g. in a binary operator method.

-- Greg


Python-3000 mailing list Python-3000 at python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/pje%40telecommunity.com



More information about the Python-3000 mailing list