Re: [Python-Dev] Exceptions in comparison operators

2012-03-13 Thread Mark Shannon
Guido van Rossum wrote: Mark, did you do anything with my reply? Not yet. I noticed the difference when developing my HotPy VM (latest incarnation thereof) which substitutes a sequence of low-level bytecodes for the high-level ones when tracing. (A bit like PyPy but much more Python-specific a

Re: [Python-Dev] Exceptions in comparison operators

2012-03-13 Thread Guido van Rossum
Mark, did you do anything with my reply? On Mon, Mar 5, 2012 at 10:41 AM, Guido van Rossum wrote: > On Mon, Mar 5, 2012 at 4:41 AM, Mark Shannon wrote: >> Comparing two objects (of the same type for simplicity) >> involves a three stage lookup: >> The class has the operator C.__eq__ >> It can be

Re: [Python-Dev] Exceptions in comparison operators

2012-03-05 Thread Guido van Rossum
On Mon, Mar 5, 2012 at 4:41 AM, Mark Shannon wrote: > Comparing two objects (of the same type for simplicity) > involves a three stage lookup: > The class has the operator C.__eq__ > It can be applied to operator (descriptor protocol): C().__eq__ > and it produces a result: C().__eq__(C()) > > Exc

[Python-Dev] Exceptions in comparison operators

2012-03-05 Thread Mark Shannon
Comparing two objects (of the same type for simplicity) involves a three stage lookup: The class has the operator C.__eq__ It can be applied to operator (descriptor protocol): C().__eq__ and it produces a result: C().__eq__(C()) Exceptions can be raised in all 3 phases, but an exception in the fi