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

None check fails #199

Closed
MoffKalast opened this issue Jun 2, 2022 · 1 comment
Closed

None check fails #199

MoffKalast opened this issue Jun 2, 2022 · 1 comment

Comments

@MoffKalast
Copy link

MoffKalast commented Jun 2, 2022

Running a if quat_instance == None check crashes with TypeError: Input object is not a quaternion. I'm not sure if that's expected behaviour.

@moble
Copy link
Owner

moble commented Jun 3, 2022

That's right. None is not a quaternion. I don't know how to check if a quaternion is equal to something that's not explicitly a quaternion (but maybe could be converted to one), so I don't pretend to know by returning False, and I'm not going to special-case None.

In python, you usually want if quat_instance is None.

@moble moble closed this as completed Jun 3, 2022
Repository owner locked and limited conversation to collaborators Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants