A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-July/005587.html below:

[Python-Dev] Comparison inconsistency with ExtensionClass

[Python-Dev] Comparison inconsistency with ExtensionClass [Python-Dev] Comparison inconsistency with ExtensionClassBarry A. Warsaw bwarsaw@beopen.com
Thu, 6 Jul 2000 10:55:36 -0400 (EDT)
>>>>> "JF" == Jim Fulton <jim@digicool.com> writes:

    JF>   Instances of two different "python types" are not compared
    JF>   using type-supplied comparison methods unless:

    JF>   - At least one of the types is InstanceType or

    JF>   - Both of the types are numeric.

    JF> This rule is rather inconvenient for ExtensionClass.
    JF> It's also pretty inconvenient for non-ExtensionClass
    JF> non-numeric extension types that want to be comparable with 
    JF> other things.

I ran into this problem when trying to translate a simple Boolean
class into a built-in type.  I basically could not get the comparisons
to work correctly when I moved to C.  So I'm +1 on fixing this at some
point (probably as Guido points out, when we add rich comparisons).

-Barry




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4