-
Notifications
You must be signed in to change notification settings - Fork 733
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
TypeError when calling a method with an enum argument #935
Comments
This kind of thing should work, I believe ... from Tests import TestClass, TestEnum
a = TestClass()
a.EnumMethod[TestEnum](TestEnum.FirstValue) |
Thanks, it does indeed. Maybe there should be some FAQ that would cover things like these? |
Thanks, that's a good idea |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Details
The enum comes in Python as an int, and since the method signature is not int, it fails.
I cannot see how to force the typecast, or whether I could somehow force the method call directly (overloads lists the method, but I can't figure out whether I can call directly).
Searching google did not return anything recent, although some older comments (2017/18 IIRC) indicated there was a fix for this?
The text was updated successfully, but these errors were encountered: