[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-10-14 Thread Eli Bendersky
Eli Bendersky added the comment: Closing, since this isn't a bug and append's behavior is properly documented. Regarding the error message, yes it could probably be better but you would need to enable input validation for that. Since Python is duck typed, often when arguments are not validated

[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +eli.bendersky, ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-25 Thread Ronald Oussoren
Ronald Oussoren added the comment: Use the extend method to add multiple elements. Both the source and documentation indicate that 'append' is used for appending a single item and 'extend' for appending multiple items (just like with list). IMHO this is not a bug. As an aside: when you import

[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-25 Thread kirpit
kirpit added the comment: well, i've just followed the source code regardless to documentation so you may be right about appending a single element. (kind of newbie around here.) but then, append method is misbehaving about asserting the parameter, isn't it? -- ___

[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-25 Thread Ronald Oussoren
Ronald Oussoren added the comment: (unassigning as this is not a mac-specific issue) BTW. Is this really a bug, the documentation says that append appends a single element : append(subelement) Add

[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-25 Thread kirpit
New submission from kirpit: xml.etree.ElementTree.Element's append method doesn't support iterator/sequence parameters as it's supposed to, for the version 1.3.0. Python 2.7.3 (default, Sep 14 2012, 09:52:31) [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin Type "