Translating some Java to Python

Herman Slagman herman_slagman at placid-dash-sky-dot-org
Mon May 21 04:26:36 EDT 2007


"Daniel Gee" <zefria at gmail.com> schreef in bericht 
news:1179692679.422164.27700 at r3g2000prh.googlegroups.com...

> class Foo:
>  def statAdd(self,a):
>    return a+5
>
> or do you drop the 'self' bit and just use a 1 variable parameter list?

class Foo:
 @staticmethod
 def statAdd(a):
   return a+5

HTH

Herman




More information about the Python-list mailing list