[Python-Dev] Fun with whitespace

Chris King colanderman at gmail.com
Fri Jul 23 22:26:54 CEST 2004


On Wed, 21 Jul 2004 16:18:34 +0200, Jack Jansen <jack.jansen at cwi.nl> wrote:

> But it makes a difference where you're pasting it: in an editor window
> (where you don't want the >>>) or in an email message (where you
> probably do want the >>>).

I like the way Gnucap (http://www.gnu.org/software/gnucap/) handles
prompt cut and pastes.  It simply ignores any prompt noise at the
beginning of a line.  Would it be difficult to have Python do the same
thing (i.e. ignore '>>>' and '...' at the beginning of a line)?

Of course you wouldn't want production code to look like this, so it
should be something tabnanny checks for and complains about. 
Otherwise this would be very useful for cut & paste testing of code
gleaned from newsgroup postings and the like into any editor (or even
the command prompt itself).


More information about the Python-Dev mailing list