[Python-Dev] vox populii illiterati

Guido van Rossum guido@python.org
Mon, 10 Feb 2003 07:49:07 -0500


> don't worry the pro-camp seems converging toward:
> 
> if if hasattr(obj,'method'): obj.method() else: False:
> 
> or
> 
> if (if hasattr(obj,'method'): obj.method() else: False):

If that's really the case, I'll gladly rewrite the PEP to use that;
it's not too bad, has no new keywords, and the out-of-order evaluation
of the current proposal is beginning to bother me more and more.

Still, I'm beginning to be more and more against any form of
if-then-else; I'm not yet sure why that is, but I think that I don't
see enough places where it's needed, and I find code using it often
harder to read.  Part of that is my general problem with decyphering
expressions with control flow -- my brain is wired to deal with
control flow at the statement level very efficiently, but not at the
expression level.

--Guido van Rossum (home page: http://www.python.org/~guido/)