[issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome

2012-05-25 Thread Alexander O

Alexander O  added the comment:

stupid question but why shouldn't this be possible ? 

class Element(_Element):
def __init__(self,name,**kwargs):
_Element.__init__(self,name)
attributes = kwargs.get("attributes")
children = kwargs.get("children")
for key,value in attributes.iteritems():
self.setAttribute(key,value)
for child in children:
self.appendChild(child)

--
nosy: +avono

___
Python tracker 
<http://bugs.python.org/issue4849>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome

2012-06-05 Thread Alexander O

Alexander O  added the comment:

On Jun 2, 2012 7:00 AM, "Alexandre Zani"  wrote:

>
> Alexandre Zani  added the comment:
>
> Here is my patch for it.
>
> --
> keywords: +patch
> Added file: http://bugs.python.org/file25796/easier_element_init.patch
>
> ___
> Python tracker 
> <http://bugs.python.org/issue4849>
> ___
>

--

___
Python tracker 
<http://bugs.python.org/issue4849>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com