Please make some code that recomputes object._x whenever object.x is updated. I intend object._x to be a "private" attribute of object and object.x to be a "dummy variable" whose only purpose is to set the value of object._x.
class tihst(object):
def __init__(self,object):
self.x=object
self.xRecall()
def xPrivate(self):
if type(self.x)==float:
self._x=self.x
elif type(self.x)==int:
self._x=float(self.x)
elif type(self.x)==str:
self._x=self.x
else:
self._x="errorStatus001"
def xRecall(self):
print "private x is :"
self.xPrivate()
print self._x
aone=tihst("002")
print vars(aone)
For example.: If a user makes a statement such as object.x="5.3"
then the instruction object.xPrivate()
should too occur.