Ezio Melotti <ezio.melo...@gmail.com> added the comment:

Attached patch fixes Element constructor to accept 'attrib' as keyword arg.  I 
couldn't find a way to make this work using PyArg_ParseTupleAndKeywords, so I 
ended up parsing the kwds by hand.
While adding more tests I found out another difference with the Python version. 
 The C version raises a TypeError if attrib is not a dict, whereas the Python 
version raises an AttributeError while attempting to do a .copy() of the 
object.  I changed the Python version to raise a TypeError too.

----------
Added file: http://bugs.python.org/file25628/issue14818-2.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14818>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to