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

[NEW FEATURE] Warn / raise exception on setting unexpected attributes #99

Open
fleborne opened this issue Jul 15, 2021 · 0 comments
Open
Assignees

Comments

@fleborne
Copy link
Contributor

fleborne commented Jul 15, 2021

What feature would you like to be included in Luos?

It seems that Pyluos doesn't complain when the user sets a value to an attribute that doesn't exist. For instance, doing the following doesn't raise any exception or warning, so it seems correct but it isn't:

from pyluos import *
c = ControllerMotor(id=0, alias="mot", device=None)
# resolution is not handled by pyluos, it should be encoder_res
c.resolution = 5

In my opinion it should raise a KeyError, AttributeError, or NotImplementedError exception for instance, depending on the philosophy of Pyluos.

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

3 participants