On Thu, Sep 3, 2009 at 7:27 PM, Abhishek Mishra <ideam...@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
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to