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 ncoghlan
Recipients berker.peksag, cryvate, eric.araujo, nascheme, ncoghlan, ned.deily, pitrou, serhiy.storchaka, tarek, vstinner
Date 2017-12-03.02:20:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512267655.44.0.213398074469.issue19610@psf.upfronthosting.co.za>
In-reply-to
Content
I'd prefer to see this change go in the other direction: instead of enforcing eager type checks, we should be unconditionally wrapping the given values in a "list(arg)" call, such that more typical iterable duck-typing behaviour applies.

That will transparently fix any code that isn't already passing a list, will ensure that internal code can safely assume that the instance *attributes* are always lists (no matter what the caller passes in), and means that even when the caller is passing in a list, the instance will have its own copy (rather than retaining a reference to the caller's copy).
History
Date User Action Args
2017-12-03 02:20:55ncoghlansetrecipients: + ncoghlan, nascheme, pitrou, vstinner, tarek, ned.deily, eric.araujo, berker.peksag, serhiy.storchaka, cryvate
2017-12-03 02:20:55ncoghlansetmessageid: <1512267655.44.0.213398074469.issue19610@psf.upfronthosting.co.za>
2017-12-03 02:20:55ncoghlanlinkissue19610 messages
2017-12-03 02:20:54ncoghlancreate