Ethan Furman wrote:
> On 06/30/2014 12:34 PM, Peter Otten wrote:
>> RainyDay wrote:
>>>
>>> def __eq__(self, other):
>>> return self._loc == getattr(other, "_loc", None)
>>
>> Note that None is not a good default when _loc is expected to be a tuple:
>
> In this case None is not bein
On 06/30/2014 12:34 PM, Peter Otten wrote:
RainyDay wrote:
def __eq__(self, other):
return self._loc == getattr(other, "_loc", None)
Note that None is not a good default when _loc is expected to be a tuple:
In this case None is not being returned, but will be comparid with sel
On Monday, June 30, 2014 3:34:25 PM UTC-4, Peter Otten wrote:
> RainyDay wrote:
>
>
>
> > Hi, in python 3.4.1, I get this surpising behaviour:
>
> >
>
> l=Loc(0,0)
>
> l2=Loc(1,1)
>
> l>l2
>
> > False
>
> l
> > True
>
> l<=l2
>
> > Traceback (most recent call l
RainyDay wrote:
> Hi, in python 3.4.1, I get this surpising behaviour:
>
l=Loc(0,0)
l2=Loc(1,1)
l>l2
> False
l True
l<=l2
> Traceback (most recent call last):
> File "", line 1, in
> TypeError: unorderable types: Loc() <= Loc()
l==l2
> False
l True
>
> Loc i
Hi, in python 3.4.1, I get this surpising behaviour:
>>> l=Loc(0,0)
>>> l2=Loc(1,1)
>>> l>l2
False
>>> l>> l<=l2
Traceback (most recent call last):
File "", line 1, in
TypeError: unorderable types: Loc() <= Loc()
>>> l==l2
False
>>> lhttps://mail.python.org/mailman/listinfo/python-list