Yigit Turgut wrote:
class test(test1):

def __init__(self, device):
.
.
.
def _something(self, x=1)
self.dt = data


if __name__ == "__main__":
test.something.dt ???

I am trying to call a variable located in a function of a class

dt is an attribute of an instance of the class.
  t = test() # create instance
  t._something() # call method that assigns attribute to t
  t.dt  # is not the value of dt for t

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to