[Python-Dev] NotImplemented comparisons
Paul Moore
p.f.moore at gmail.com
Thu Aug 2 21:45:00 CEST 2007
On 02/08/07, Facundo Batista <facundobatista at gmail.com> wrote:
> I understand that is tricky how NotImplemented and comparisons interact.
>
> But how do you explain the difference in behaviour between Linux and Windows?
A wild guess: c < None falls back to checking c.__cmp__(None) < 0.
This translates to NotImplemented < 0, and as the ordering of built in
types is implementation dependent, maybe that explains the difference
between Windows and Linux?
Paul.
More information about the Python-Dev
mailing list