I want to create an object in python that has a few attributes and I want to protect myself from accidentally using the wrong attribute name. The code is as follows:
<
class MyClass( object ) : m = None # my attribute
The m here is the class attributes, rather than the instance attribute. You need to connect it with your instance by self in __init__.
m
__init__