Hello
I am trying to get a value as integer and a string.
>>> class Value:
def __init__(self,inte='',stri=''):
self.inte=inte
self.stri=stri
def setvalue(self,inte='',stri=''):
self.stri=str(self.inte)
self.inte=int(self.stri)
>>> v=Value(45)
>>> print v.stri
>>> v.inte
45
>>> v.stri
''
>>> c=Value('36')
>>> c.stri
''
>>>
But it is not converting.How can I do it?
Prasad
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor