is there any principle when writing python function

alex23 wuwei23 at gmail.com
Tue Aug 23 23:05:18 EDT 2011


rantingrick <rantingr... at gmail.com> wrote:
> Everyone here who is suggesting that function bodies should be
> confined to ANY length is an idiot.

Or, more likely, is the sort of coder who has worked with other coders
in the past and understands the value of readable code.

> Don't worry if it too small or too big. It's
> not the size that matters, it's the motion of the sources ocean!

If only you spent as much time actually thinking about what you're
saying as trying to find 'clever' ways to say it...

> Always use
> comments to clarify code and NEVER EVER create more functions only for
> the sake of short function bodies

This is quite likely the worst advice you've ever given. I can only
assume you've never had to refactor the sort of code you're advocating
here.



More information about the Python-list mailing list