literals optimization (was Re: append on lists)
Grant Edwards
invalid at invalid
Tue Sep 16 13:43:29 EDT 2008
On 2008-09-16, Maric Michaud <maric at aristote.info> wrote:
> Le Tuesday 16 September 2008 18:26:38 Grant Edwards, vous avez ?crit?:
>> I was asking where in the specification
>> <http://docs.python.org/ref/ref.html> it says that all
>> expressions that return something, return a new object. ?
>
> I never said this, I said it's the spirit of python APIs, with
> some noticeable exceptions (see my first post). But for this
> case specifically, a + b *should* return a new object, see the
> documentation of __add__ and __iadd__ special methods, it's
> clearly stated.
OK, I've read through the documentation for __add__ and
__iadd__ in the language reference, and I can't find anything
that states or implies that they are to return a new object.
Can you perhaps provide a link or some sort of cite?
--
Grant Edwards grante Yow! Are you selling NYLON
at OIL WELLS?? If so, we can
visi.com use TWO DOZEN!!
More information about the Python-list
mailing list