Martin Panter added the comment:

Ideally I guess the Python native behaviour is better: only call 
target.doctype() if available. It might allow you to easily implement doctype() 
in both the old and new versions of the API, without worrying about the API 
being called twice, and without experiencing any DeprecationWarning. But I do 
not have a real-world use case to demonstrate this, and I don’t think this 
decision should hold up committing inherit-doctype.v2.patch. They are separate 

BTW: Another difference between the implementations is that the C version 
accepts my <!DOCTYPE blaua> test case, but the Python version ignores it. It 
only works with a more elaborate case like <!DOCTYPE blaua SYSTEM "dtd">. I’m 
no expert, but I think my original XML should be allowed.


Python tracker <>
Python-bugs-list mailing list

Reply via email to