If/then style question

Carl Banks pavlovevidence at gmail.com
Sat Dec 18 22:59:45 EST 2010


On Dec 17, 12:23 am, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> On Thu, 16 Dec 2010 20:32:29 -0800, Carl Banks wrote:
> > Even without the cleanup issue, sometimes you want to edit a function to
> > affect all return values somehow.  If you have a single exit point you
> > just make the change there; if you have mulitple you have to hunt them
> > down and change all of them--if you remember to.  I just got bit by that
> > one.
>
> If your function has so many exit points that you can miss some of them
> while editing, your function is too big, does too much, or both.

Sanctimonious much?  In the real world, people "miss things" and "make
mistakes" and not necessarily because they are working on something
too complex to handle.  It happens.


Carl Banks



More information about the Python-list mailing list