Re: Translating some Java to Python

2007-05-21 Thread Herman Slagman
"Gabriel Genellina" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > En Mon, 21 May 2007 07:39:09 -0300, Unknown <[EMAIL PROTECTED]> > escribió: > >> "Ant" <[EMAIL PROTECTED]> schreef in bericht >> news:[EMAIL PROTECTED] >> >>> Herman has shown you *how* to do static methods in Py

Re: Translating some Java to Python

2007-05-21 Thread Herman Slagman
"Ant" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > Herman has shown you *how* to do static methods in Python, but > typically they are not used. Since Python has first class functions, > and they can be defined at the module level, there is no need to use > static methods. Hm

Re: Translating some Java to Python

2007-05-21 Thread Herman Slagman
"Daniel Gee" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > 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 -- http://mail.pyth