Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison operations with SphinxProxy objects violate symmetry #18

Open
forcefield opened this issue Nov 12, 2010 · 0 comments
Open

Comparison operations with SphinxProxy objects violate symmetry #18

forcefield opened this issue Nov 12, 2010 · 0 comments

Comments

@forcefield
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant