"return" in def
Manish Sinha
manishsinha.tech at gmail.com
Sun Dec 28 13:22:01 EST 2008
Roger wrote:
> Hi Everyone,
>
> First I want to thank everyone that posts to this group. I read it
> daily and always learn something new even if I never feel like I have
> anything to contribute but my questions.
>
Same here, I always read the news, but hardly post anything since am not
very much expert in Python.
> Even when I'm not explicitly returning something I like to add
> "return" because it's a good additional visual marker for me to see
> where a method definition ends especially in cases where I may use a
> nested method.
>
I would personally prefer to use a comment for return rather than giving
an explicit return statement.
e.g.
# return from function
--
Manish Sinha
Personal Blog: http://www.manishsinha.info
Tech Blog: http://manishtech.wordpress.com
OpenPGP Key: 99E6658F
More information about the Python-list
mailing list