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 you get less-than-good error messages if things go 
wrong. In this case, append expect something Element-like that would have an 
"iter" method, and complains when that's not found.

In 3.3 this whole thing was improved by always validating arguments in 
append/extend etc. and raising a TypeError when something is wrong. I don't 
think there's good enough reason to change this in 2.7

----------
stage:  -> committed/rejected
status: open -> closed

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

Reply via email to