[Tutor] proper return style

alan.gauld@bt.com alan.gauld@bt.com
Tue, 30 Oct 2001 11:28:03 -0000

> What's the rule about using a explicit return command in 
> functions? 

return returns values - which may be None...

> works the same as:
> def printSquare(number):
>     print number**2
> What's preferred?

Personally I prefer the second case shown above. If 
there's nothing to return don't use return...

But thats just my personal preference.

Alan g.