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

Support for arbitrary non-integer objects #4

Open
n1ngu opened this issue Apr 16, 2021 · 1 comment
Open

Support for arbitrary non-integer objects #4

n1ngu opened this issue Apr 16, 2021 · 1 comment

Comments

@n1ngu
Copy link

n1ngu commented Apr 16, 2021

Some objects might represent integers, and implement basic arithmetic operations with integers (+1 and //2) through https://docs.python.org/3/reference/datamodel.html#emulating-numeric-types

While they are not python numbers, they could still be paired with this library.

E.g. objects representing database columns, futurized integer results, arbitrary formula engines, etc, etc.

Simply removing the integer cast in the pairing function should do the trick.

The usage should be documented to call the pairing function with the safe=False flag, since depairing will generally be not possible.

@n1ngu
Copy link
Author

n1ngu commented Apr 16, 2021

#3 would solve this (except for the documentation concern)

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