[Tutor] static methods & class methods
alan.gauld at btinternet.com
Fri Apr 20 21:11:25 CEST 2012
On 20/04/12 16:32, Surya K wrote:
> I java it really works well.
Works almost identically in both.
Of course in Java the 'this' is optional but many style guides
recommend its use to make it clear where the function lives...
If you really like 'this' over 'self' you can even do that too:
def foo(this): pass
Author of the Learn to Program web site
More information about the Tutor