Structure using whitespace vs logical whitespace

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Dec 16 10:00:32 CET 2008


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


-- 
Gabriel Genellina




More information about the Python-list mailing list