I found an earlier post about subclassing cElementTree.Element which can't be done because it is a factory method. I am trying to subclass XMLTreeBuilder with success using the python implementation, but not with cElementTree.
[1013]$ python Python 2.3.4 (#1, Feb 22 2005, 04:09:37) [GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import elementtree.ElementTree >>> class X(elementtree.ElementTree.XMLTreeBuilder): ... pass ... >>> import cElementTree >>> class Y(cElementTree.XMLTreeBuilder): ... pass ... Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: cannot create 'builtin_function_or_method' instances >>> Is it possible to subclass cElementTree.XMLTreeBuilder? Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list