[BangPypers] Why the None ?
Venkatraman S
venkat83 at gmail.com
Thu Sep 3 15:59:20 CEST 2009
On Thu, Sep 3, 2009 at 7:27 PM, Abhishek Mishra <ideamonk at gmail.com> wrote:
>
> ------------------------------------------------
> def gimmetaste(length=5):
> print length
>
> if __name__ == '__main__':
> print gimmetaste()
> ------------------------------------------------
>
> Output -
> 5
> None
>
> I wonder why I get a None in the output?
>
Hint : Think 'scoping rules'
-V-
http://twitter.com/venkasub
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20090903/87a5e358/attachment.htm>
More information about the BangPypers
mailing list