[Python-ideas] Should this be considered a bug?
Georg Brandl
g.brandl at gmx.net
Sun Oct 30 14:30:17 CET 2011
On 10/30/2011 01:17 PM, Nick Coghlan wrote:
> On Sun, Oct 30, 2011 at 9:10 PM, Georg Brandl <g.brandl at gmx.net> wrote:
>> It's still a bit inconsistent though (e.g. it doesn't work with tuple's
>> __iadd__).
>
> Tuple doesn't have an __iadd__, it's immutable :)
Ah yes, that might be the reason ;)
> As Antoine noted, list.__iadd__ is actually just list.extend under the
> hood, and accepts an arbitrary iterable.
>
> We're a bit more restrictive with other mutable container types (e.g.
> set, bytearray), but in those cases, the corresponding methods also
> only accept a limited selection of object types.
Makes sense.
Georg
More information about the Python-ideas
mailing list