Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Structure using whitespace vs logical whitespace

Thread Tools

Structure using whitespace vs logical whitespace

Eric Brunel
Posts: n/a
On Tue, 16 Dec 2008 10:00:32 +0100, Gabriel Genellina
<(E-Mail Removed)> wrote:

> En Mon, 15 Dec 2008 14:29:31 -0200, Removed)
> <(E-Mail Removed)> 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
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to implement logical equivalence (==) or negation (!) using onlybinary operators Ricky C Programming 6 04-15-2010 08:19 PM
Re: Splitting text at whitespace but keeping the whitespace in thereturned list MRAB Python 3 01-26-2010 11:36 PM
Using logical operators on parameterized-length vectors VHDL 7 07-12-2007 04:43 PM
Whitespace where I don't want whitespace! Oli Filth HTML 9 01-17-2005 08:47 PM
Pointers to structure and array of structure. Excluded_Middle C Programming 4 10-26-2004 05:39 AM