Skip to content

Comparison operations with SphinxProxy objects violate symmetry #18

Open
@forcefield

Description

@forcefield

The current implementation of eq, cmp in SphinxProxy violates symmetry. For instance, suppose you have

a = Object()
b = SphinxProxy( a )

You have b==a return True, but a==b return False, and even b==b return False.

This makes it awkward to use SphinxProxy object directly in further queries, such as

get_object_or_404( id = b )

will fail because it is trying to use the eq operator treating b as the second argument.

Any way to improve this behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions