default argument

Back9 backgoodoo at gmail.com
Tue May 11 15:08:04 EDT 2010


On May 11, 3:06 pm, Back9 <backgoo... at gmail.com> wrote:
> Hi,
>
> Is this grammer working in Python?
>
> class test:
>   self._value = 10
>   def func(self, self._value)
>
> When i try it, it complains about undefined self.
>
> i don't know why.
>
> TIA

Sorry
here is the what i meant
class test:
  self._value = 10
  def func(self, pos = self._value)




More information about the Python-list mailing list