[Chicago] Factoring fun with functions in Python

Dan Krol orblivion at gmail.com
Wed Nov 14 05:35:17 CET 2012


One thing I struggle with on this count is that spitting it up to this
degree makes it confusing all over again, because there's so many
functions, so many lines of logic to follow. There's no indicating what the
"main idea" is, you just have to read it all to find out what isn't being
called by everything else.

The only solutions I've come up with are A) making functions small but not
that small, and B) defining functions inside other functions, so that it's
clear what functions are there purely for the benefit of other functions.

Any ideas on that front? Isn't there such a thing as splitting functions up
*too* much?
On Nov 13, 2012 2:10 PM, "Cezar Jenkins" <emperorcezar at gmail.com> wrote:

> I like it.
>
> At one point, many moons ago I was a youngling and didn't think that
> readability was paramount.
> Then I inherited a giant jumbled PHP app. We now use Python.
>
> On Nov 13, 2012, at 10:59 AM, Garrett Smith <g at rre.tt> wrote:
>
> > As penance for missing the last several Chipys, I've extended "solving
> > embarrassing obvious problems" to Python:
> >
> >
> http://www.gar1t.com/blog/2012/11/11/more-embarrassingly-obvious-problems/
> >
> > Will be interested to hear feedback from this group :)
> >
> > Garrett
> > _______________________________________________
> > Chicago mailing list
> > Chicago at python.org
> > http://mail.python.org/mailman/listinfo/chicago
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20121113/44964c90/attachment.html>


More information about the Chicago mailing list