[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: assignment, reference, += and parameter passing
Fredrik Lundh wrote:
>
>...
>
> (in your example, the design mistake is probably to implement "+="
> for lists to mean "extend". guess someone got carried away...)
I agree that this is a design mistake but it isn't a bug. I guess part
of the reason for the addition of += was to allow mutable objects to be
extended in-place using a convenient syntax. I'm not justifying it..I'm
just saying that it wasn't an accident that slipped past Guido. It was
actually kind of the effect he was trying to get at.
Paul Prescod