[Python-Dev] hash comments in interactive interpreter

Guido van Rossum guido at python.org
Fri May 21 15:29:51 EDT 2004


> I'm wondering what the rationale is for hash comments yielding a 
> continuation prompt (PS2) in the interactive interpreter.  I'd like to 
> put such comments in interactive examples, but the output is hard to follow:
> 
>    >>> a = 5
>    >>> # and now for some multiplication
>    ...
>    >>> a * 10
>    50

It's a bug -- but not easy to fix or it would have been fixed long
ago.  Probably the lexter could be hacked to fix this, but be careful
that a change doesn't botch all the other special cases!

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list