is there a whitespace-free python convention?

Laura Creighton lac at strakt.com
Sat Feb 8 03:10:58 EST 2003


> I stumbled across this problem with posting code snippets to a
> sourceforge discussion -- basically, there's no whitespace
> preservation, though newlines are preserved [or it wouldn't even be
> worth trying], so even simple code gets mangled.  
> 
> Arguably, the fix is for sourceforge to support some mechansim for not
> losing whitespace (perhaps html tags, but <pre> clearly didn't work.)
> However, a related case came to mind -- a friend of mine does all of
> his coding with emacspeak, and while he can switch it to 'explicit
> whitespace' mode, it is kind of painful.
> 
> So, working from both sides, is there a convention that people
> actually like for expressing indentation when it isn't really there? 

I used an editor once which painted the screen in strips of gradually
lightening shades <of user-selectable colour>.  When you got to the
code part it stayed one colour <very lightest whatever>.  It was used
to teach people to indent their code properly.  When we wanted to talk
about it, and report bugs in it, we used \t1\t2\t3 in our discussions.
This worked out fine, but there were no 'tab or space' wars there
either.

Laura





More information about the Python-list mailing list