Done :)
I summarized my point of view and I'm waiting for comments :)
Pierre
Aahz a écrit :
> On Thu, Sep 29, 2005, Pierre Barbier de Reuille wrote:
>
>>Ok, so I took a closer look at the documentation and tried a few things
>>to understand better what you said and I have some remark ...
>
>
On Thu, Sep 29, 2005, Pierre Barbier de Reuille wrote:
>
> Ok, so I took a closer look at the documentation and tried a few things
> to understand better what you said and I have some remark ...
I've got some counter-remarks, but python-dev is not the place to
discuss them. Please move this threa
Ok, so I took a closer look at the documentation and tried a few things
to understand better what you said and I have some remark ...
Phillip J. Eby a ecrit :
> At 06:15 PM 9/28/2005 +0200, Pierre Barbier de Reuille wrote:
>
>> Regularly, you see questions about augmented assignment on Python-tut
At 06:15 PM 9/28/2005 +0200, Pierre Barbier de Reuille wrote:
>Regularly, you see questions about augmented assignment on Python-tutor
>mailing list, I often have question in my lab because of problems ...
>most of the time people learn to avoid these operators in the end ! And
>my look in the stan
Phillip J. Eby a écrit :
> At 05:40 PM 9/28/2005 +0200, Pierre Barbier de Reuille wrote:
>
>> Rather than closing this as invalid, it would be wiser to update the
>> documentation before ! Nothing corresponds to the current behavior.
>
>
> I got my information from here:
>
> http://www.python.
At 05:40 PM 9/28/2005 +0200, Pierre Barbier de Reuille wrote:
>Rather than closing this as invalid, it would be wiser to update the
>documentation before ! Nothing corresponds to the current behavior.
I got my information from here:
http://www.python.org/2.0/new-python.html#SECTION0007000
At 05:15 PM 9/28/2005 +0200, Reinhold Birkenfeld wrote:
>Okay. I assume that we must accept that
>
>s = set()
>t = (s,)
>t[0] |= set([1])
>
>changes s in spite of raising TypeError.
There are lots of operations that can be partially completed before raising
an error, so I'm not sure why this case
Phillip J. Eby a écrit :
> At 03:12 PM 9/28/2005 +0200, Reinhold Birkenfeld wrote:
[...]
> Yes. See:
>
> http://www.python.org/2.0/new-python.html#SECTION00070
>
> The purpose of the augmented assignment forms is to allow for the
> possibility that the item's __i*__ method may o
Phillip J. Eby wrote:
>>A case where this matters is here: http://python.org/sf/1306777
>
> I've closed it as invalid; the behavior is as-defined.
>
> In principle, there *could* be an optimization to avoid rebinding the
> lvalue in the case where the __i*__ form did return self. But using it
At 03:12 PM 9/28/2005 +0200, Reinhold Birkenfeld wrote:
>Hi,
>
>a general question. Consider:
>
>class A(list):
> def __setitem__(self, index, item):
> # do something with index and item
> return list.__setitem__(self, index, item)
>
>lst = A([1,set()])
>
>lst[0] |= 1
>
>lst[1]
On Sep 28, 2005, at 9:12 AM, Reinhold Birkenfeld wrote:
> Hi,
>
> a general question. Consider:
>
> class A(list):
> def __setitem__(self, index, item):
> # do something with index and item
> return list.__setitem__(self, index, item)
>
> lst = A([1,set()])
>
> lst[0] |= 1
>
>
Hi,
a general question. Consider:
class A(list):
def __setitem__(self, index, item):
# do something with index and item
return list.__setitem__(self, index, item)
lst = A([1,set()])
lst[0] |= 1
lst[1] |= set([1])
Do we want lst.__setitem__ to be called in the second inplac
12 matches
Mail list logo