On Dec 28, 5:19 pm, Roger <rdcol...@gmail.com> wrote:
> Hi Everyone,
[...]
> When I define a method I always include a return statement out of
> habit even if I don't return anything explicitly:
>
> def something():
>         # do something
>         return
>
> Is this pythonic or excessive?  Is this an unnecessary affectation
> that only adds clock ticks to my app and would I be better off
> removing "returns" where nothing is returned or is it common practice
> to have returns.
>

It's not particularly excessive but it is uncommon. A nekkid return
can sometimes be essential within a function body, so a non-essential
nekkid return could be considered just noise.

G.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to