There's an inconsistency between the definitions of htmlescape() in the Python and C versions. The Python version uses "isinstance(s, htmltext)" to test for htmltext instances. The C version uses "((v)->ob_type == &htmltext_Type)" which mirrors the old "classof(s) is htmltext" behaviour. Thus, the C implementation does not recognize subclasses of htmltext.

To allow for htmltext subclasses to work as expected, could _c_htmltext.c be modified so that:

#define htmltextObject_Check(v)    ((v)->ob_type == &htmltext_Type)

is replaced with

#define htmltextObject_Check(v) (PyType_IsSubtype((v)->ob_type, &htmltext_Type))

Thanks,
Graham

_______________________________________________
Quixote-users mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/quixote-users

Reply via email to