Re: How to use a parameter in a class

2008-05-03 Thread Florian Herlings
Hello Decebal, I am new to python myself, which might be the cause why I do not get that "last line" at all. To me it looks like you are trying to set a variable in the class body (if I am reading the indent correctly) and call a function (that does not exist?) to calculate the value for it. Does

Re: How to use a parameter in a class

2008-05-03 Thread Gary Herron
Decebal wrote: I have the following class: # class Dummy(): value = 0 def __init__(self, thisValue): print thisValue self.value = thisValue value = thisValue def testing(self): print 'In test: %d' % self.value def returnValue(self): re

Re: How to use a parameter in a class

2008-05-03 Thread Ivan Illarionov
On Sat, 03 May 2008 03:05:31 -0700, Decebal wrote: > I have the following class: > # > class Dummy(): > value = 0 > def __init__(self, thisValue): > print thisValue > self.value = thisValue > value = thisValue > > def testing(self): > print 'In test

Re: How to use a parameter in a class

2008-05-03 Thread svetoslav . agafonkin
On May 3, 1:05 pm, Decebal <[EMAIL PROTECTED]> wrote: > I have the following class: > # > class Dummy(): >     value = 0 >     def __init__(self, thisValue): >         print thisValue >         self.value = thisValue >         value = thisValue > >     def testing(self): >         print 'In tes

How to use a parameter in a class

2008-05-03 Thread Decebal
I have the following class: # class Dummy(): value = 0 def __init__(self, thisValue): print thisValue self.value = thisValue value = thisValue def testing(self): print 'In test: %d' % self.value def returnValue(self): return self.value