Message307483
| 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). |
|