On Tue, Feb 21, 2012 at 11:39 AM, Eli Bendersky <eli...@gmail.com> wrote: > So the two choices here are either change the documentation or the C > implementation to actually make Element a class. The first is of course > simpler. However, someone somewhere may have written code that knowingly > forces the Python implementation to be used and subclasses Element. Such > code will break in 3.3, so it probably makes sense to invest in making > Element a class in the C implementation as well.
Yeah, that's my take as well (especially since, in 3.2 and earlier, "forcing" use of the pure Python version was just a matter of importing ElementTree instead of cElementTree). While Xavier's point about lxml following cElementTree's lead and using a factory function is an interesting one, I think in this case the documented behaviour + pure Python implementation win out over the C accelerator behaviour. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ 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