".>>>" is a good idea! (OT, was: Re: do you master list comprehensions?)

Nick Coghlan ncoghlan at iinet.net.au
Thu Dec 16 15:22:19 CET 2004


Roel Schroeven wrote:
> Stefan Behnel wrote:
>> This is the first time I see that and I totally like the idea of 
>> writing ".>>>" instead of ">>>" at the beginning of a line. Thank you 
>> Dr. Dobb! It's unfortunate for c.l.py that Python uses ">>>" as the 
>> default prompt as it messes up the display on mail/news readers that 
>> provide "syntax highlighting" for quotes.

I use Thunderbird, and started doing it so I could read my own posts. I did copy 
it from someone, though (but I can't recall who).

The trick can also be useful for web tools that strip leading whitespace.

> Prepending every line with . is not an ideal solution though... I think 
> it gets tiresome very quickly.

Aye, can't argue with that. It does have the virtues of reliability and 
portability, though :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at email.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.skystorm.net



More information about the Python-list mailing list