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

order_by cannot be called with generic callable #687

Open
yggdr opened this issue May 20, 2023 · 0 comments
Open

order_by cannot be called with generic callable #687

yggdr opened this issue May 20, 2023 · 0 comments

Comments

@yggdr
Copy link

yggdr commented May 20, 2023

order_by checks if its first argument is an instance of types.FunctionType. This makes it impossible to use it with general callables like methods, instances with __call__, operator.itemgetter(-1) etc. It should therefore changed to check for if callable(args[0]).

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