On 30 dic, 06:24, Riccardo Murri <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] writes:
>
> >>   (Pydb) p graph == self.base[27]  
> >>   True
> >>   (Pydb) p graph in self.base
> >>   True
> >>   (Pydb) self.base.index(graph)
> >>   *** ValueError: list.index(x): x not in list

> > Looking at the source for both methods, they only
> > use the __eq__ operator, but there is a slight difference: while one
> > evaluates list[i]==x, the other reverses the operands. If your __eq__
> > is not reflexive, that could explain the difference.
>
> That was indeed the reason: a bug in Graph.__eq__ broke reflexivity in
> certain cases.

Combined with some other WTF bugs I've found at work, lately I feel
more like a detective than a software developer :)

--
Gabriel Genellina
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to