Users adding properties to classes that aren't used
One "feature" of Python classes is that users can add new properties on the fly with certain expectations of how that property will change functionality. In the case of DIRFM, only the properties that currently exist in each class should be used, so I'd like to use either __slots__
or __setattr__
to throw an error when a user tries to add a new property.
One example of this is when someone attempted to set the anchor field of a static instance after initialization and assumed it was static_instance.anchor = "terrain"
when the property name was actually _anchor
. The underscore prefix is a convention that tells people this property should not be manually manipulated and should only be modified with getters/setters.