Skip to content

Rich compasions of Int32-based ints and subclasses of int return NotImplemented #1554

@slozier

Description

@slozier

Calling a rich comparison directly on an instance of an Int32-based int returns NotImplemented for subclasses of int. In CPython, the comparison succeeds. However, it works properly for BigInteger. for For example:

import System

class test(int): pass

assert (0).__lt__(test(1)) is True

assert (0).ToBigInteger().__lt__(test(1)) is True

Seems to have broken somewhere between the alpha and the beta releases. @BCSharp could this be related to your work on #52?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions