[BangPypers] Why the None ?

Abhishek Mishra ideamonk at gmail.com
Thu Sep 3 15:57:27 CEST 2009


Hi, I'm trying to pass 5 as default value for this function...

------------------------------------------------
def gimmetaste(length=5):
	print length
	
if __name__ == '__main__':
	print gimmetaste()
------------------------------------------------

Output -
5
None

I wonder why I get a None in the output?


More information about the BangPypers mailing list