Structure using whitespace vs logical whitespace

Eric Brunel see.signature at no.spam
Tue Dec 16 10:51:58 EST 2008


On Tue, 16 Dec 2008 10:00:32 +0100, Gabriel Genellina  
<gagsl-py2 at yahoo.com.ar> wrote:

> En Mon, 15 Dec 2008 14:29:31 -0200, cmdrrickhunter at yaho.com  
> <conrad.ammon at gmail.com> escribió:
>
>> PS. In my opinion the solution would be to have the option of entering
>> a "whitespace insensitive" mode which uses C style {} and ;.  The
>> token to enter it could be as complicated as you want (in fact, it may
>> make sense to make it complicated to discourage use unless it's really
>> advantageous).  I'd sugest {{ and }} or something bigger like {={ }
>> =}.  Only two problems: 1) I'm sure it would offend Guido's sense of
>> language aesthetics  2) I'm sure the idea has been hashed over on this
>> newsgroup to death... hence prefering a workaround instead.
>
> It's a hidden feature, already implemented. Try:
>
>  from __future__ import braces

I was almost shocked so I tried it. It's much clearer now... ;-)
-- 
python -c "print ''.join([chr(154 - ord(c)) for c in  
'U(17zX(%,5.zmz5(17l8(%,5.Z*(93-965$l7+-'])"



More information about the Python-list mailing list