[XML-SIG] xml.dom.minidom.Text no more __init__?
bhartsho at yahoo.com
Fri Mar 26 11:10:26 EST 2004
So does that mean that the Text class can not be subclassed? Looks like Text's parent class
CharacterData has an __init__, i thought calling init on Text would have been forwarded to its
Here's my code:
class TextNode(BaseNode, xml.dom.minidom.Text):
def __init__(self, data):
--- "Fred L. Drake, Jr." <fdrake at acm.org> wrote:
> On Thursday 25 March 2004 09:55 pm, brett hartshorn wrote:
> > What happened to the Text node in minidom?
> > With Redhat9 it works fine, but in Fedora Core1 is seems to have changed.
> > I am trying to overload the Text class and here is the error message i am
> > getting:
> > xml.dom.minidom.Text.__init__(self, data)
> > AttributeError: class Text has no attribute '__init__'
> The constructor for the Text class has never been part of the documented API.
> The __init__(), in particular, was removed to support faster creation of an
> entire tree (which was very successful).
> The Document object has a factory method, createTextNode(), that takes the
> text for the node as the only argument. This is the only documented and
> supported way to construct new text nodes. Other factory methods are used
> for other node types.
> Fred L. Drake, Jr. <fdrake at acm.org>
> PythonLabs at Zope Corporation
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
More information about the XML-SIG