At the moment _validate_params_ is redefined by classes inheriting from Object and NamedObject. However, to use it correctly, it is necessary for the inheriting object to know what the arguments should be. At the moment, this mostly means knowing you're calling NamedObject._validate_params_ because you know it will take a name and description as an argument. This makes handling the class hierarchy overly brittle.
I suggest that we remove Object._validate_params_ and rename NamedObject._validate_params_ to something like _validate_names_ which can be sucessfully called (as self._validate_names_(name, description) on all objects which inherit from NamedObject.
At the moment
_validate_params_
is redefined by classes inheriting fromObject
andNamedObject
. However, to use it correctly, it is necessary for the inheriting object to know what the arguments should be. At the moment, this mostly means knowing you're callingNamedObject._validate_params_
because you know it will take a name and description as an argument. This makes handling the class hierarchy overly brittle.I suggest that we remove
Object._validate_params_
and renameNamedObject._validate_params_
to something like_validate_names_
which can be sucessfully called (asself._validate_names_(name, description)
on all objects which inherit fromNamedObject
.