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 eli.bendersky
Recipients eli.bendersky, ezio.melotti, kirpit, ronaldoussoren
Date 2012-10-14.13:09:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350220142.86.0.315382887939.issue16044@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2012-10-14 13:09:02eli.benderskysetrecipients: + eli.bendersky, ronaldoussoren, ezio.melotti, kirpit
2012-10-14 13:09:02eli.benderskysetmessageid: <1350220142.86.0.315382887939.issue16044@psf.upfronthosting.co.za>
2012-10-14 13:09:02eli.benderskylinkissue16044 messages
2012-10-14 13:09:02eli.benderskycreate