Message230402
I think I've changed my mind on this. The important distinction is not between "ducktyping" or "cooperating". It's that this is an in-place mutating operation. A mutating operation should always be the responsibility of the receiver, and so it sounds wrong to be able to delegate it to the read-only operand.
For example, when calling list.extend(op), the list object doesn't allow `op` to take over the operation's semantics. So I think TypeError is the right outcome here. |
|
Date |
User |
Action |
Args |
2014-10-31 22:23:13 | pitrou | set | recipients:
+ pitrou, rhettinger, r.david.murray, ethan.furman, Joshua.Chin |
2014-10-31 22:23:13 | pitrou | set | messageid: <1414794193.36.0.480135087255.issue22766@psf.upfronthosting.co.za> |
2014-10-31 22:23:13 | pitrou | link | issue22766 messages |
2014-10-31 22:23:13 | pitrou | create | |
|