This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author exarkun
Recipients exarkun
Date 2009-01-05.19:08:25
SpamBayes Score 0.3457451
Marked as misclassified No
Message-id <1231182515.38.0.572857860756.issue4849@psf.upfronthosting.co.za>
In-reply-to
Content
In order to create an element with an attribute and a child, this is
necessary:

    e = Element("foo")
    e.setAttribute("bar", "baz")
    e.appendChild(quux)

It would be preferable if Element.__init__ accepted two additional
parameters to shorten this:

    e = Element("foo", attributes={"bar": "baz"}, children=[quux])

It may also be preferable to have a third new parameter, attributesNS,
to parallel the Element.setAttributeNS method.  This would accept a dict
mapping namespaceURI and qualifiedName to an attribute value.
History
Date User Action Args
2009-01-05 19:08:36exarkunsetrecipients: + exarkun
2009-01-05 19:08:35exarkunsetmessageid: <1231182515.38.0.572857860756.issue4849@psf.upfronthosting.co.za>
2009-01-05 19:08:25exarkunlinkissue4849 messages
2009-01-05 19:08:25exarkuncreate