Luos-io/Pyluos

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

Opened this issue · 0 comments

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.