M.-A. Lemburg wrote: > Please note that inheritance from string will cause the C type > checks of the form PyString_Check(obj) to return true. > C code will then assume that it has an object which is > compatible to string C API which instances aren't.
Oh, sure they are. Types inheriting from str have the same layout as str, and C code assuming that layout will work fine with them. Inheritance works (saying "inheritance *just* works would deny the many fine details that have been engineered to actually make it work"). Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com