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

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Thu Dec 16 14:04:51 EST 2004


Steve Holden wrote:
> Nick Coghlan wrote:
> $ python
> Python 2.4 (#1, Dec  4 2004, 20:10:33)
> [GCC 3.3.3 (cygwin special)] on cygwin
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import sys
>  >>> sys.ps1 = ".>>> "; sys.ps2 = ".... "
> .>>> print """\
> .... It isn't that hard"""
> It isn't that hard
> .>>>
> 
> Would it work, I wonder, with a leading space on the prompt? That might 
> be a valid change to the standard prompt. Let's see
> 
>  >>> This line isn't really quoted three times.

Seems to work :) Now let's hope lots of people will use an approach like 
that for code sent to the various Python newsgroups and mailing lists.

-- 
"Codito ergo sum"
Roel Schroeven



More information about the Python-list mailing list