The problem with "as" [was "Re: PEP 318"]

Stephen Horne steve at ninereeds.fsnet.co.uk
Sat Mar 27 11:28:25 EST 2004


On Fri, 26 Mar 2004 09:48:17 -0700, David MacQuigg <dmq at gain.com>
wrote:

>There may also be some objection to the fact that this use of
>indentation (setting options) is inconsistent with every other use
>(controlling program flow).

I already gave my opinions on that issue elsewhere. First off, the
relative consistency in how Python uses blocks is a side-effect of an
unrelated principle, not a principle in itself - the 'right thing' can
still be to use block structure for other things. Secondly, Python
doesn't just use indented blocks purely to control program flow - it
is also used to define local contexts in the sense of local scopes
(class, def) so why not do the same, but with local options being the
local context?

>This is the best time to do it, while we are learning the
>language. Later, we will forget the problems we had in learning.

Actually, I've been using Python for about 7 years or so, on and off -
slightly longer than I've been using C++, and it's almost certainly my
record holder for the longest period of sustained more-or-less-regular
use (though sadly not for quantity). I first started with Python 1.4
on an iMac, as a result of a desperate search for languages I could
actually run on that thing.

To the extent that I'm still learning Python, I'll probably always
still be learning it ;-)


-- 
Steve Horne

steve at ninereeds dot fsnet dot co dot uk



More information about the Python-list mailing list