[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: python-mode: make sure output is not eaten
From: |
Steven Huwig |
Subject: |
Re: python-mode: make sure output is not eaten |
Date: |
Thu, 24 Aug 2006 20:18:07 -0400 |
On Aug 23, 2006, at 12:04 AM, Stefan Monnier wrote:
Yes, of course. BTW do you have any idea why the current code uses
"\n\n"?
Might it be because the Python interactive interpreter needs the extra
newline due to significant whitespace? E.g.
>>> for i in range(1,5):
... print i,
...
1 2 3 4
a DEDENT token is created by the unindented second newline, closing
the block. A single newline cannot do that as it is also the
statement terminator.
Probably it compensates for indented text without a trailing newline.
It doesn't look like python-mode itself has any situations where this
matters, but it is possible -- but unlikely -- for user input to be
affected.
If you do the following in python-mode with both versions:
C-c C-s for i in range(1, 5): C-q C-j
<tab> print i, <return>
you will see the difference in behavior.
-- Steven Huwig
- python-mode: make sure output is not eaten, Slawomir Nowaczyk, 2006/08/21
- Re: python-mode: make sure output is not eaten, Stefan Monnier, 2006/08/22
- Re: python-mode: make sure output is not eaten, Slawomir Nowaczyk, 2006/08/22
- Re: python-mode: make sure output is not eaten, Stefan Monnier, 2006/08/24
- Re: python-mode: make sure output is not eaten,
Steven Huwig <=
- Re: python-mode: make sure output is not eaten, Steven Huwig, 2006/08/24
- Re: python-mode: make sure output is not eaten, Slawomir Nowaczyk, 2006/08/25
- Re: python-mode: make sure output is not eaten, Steven Huwig, 2006/08/25
- Re: python-mode: make sure output is not eaten, Ken Manheimer, 2006/08/25
- Re: python-mode: make sure output is not eaten, Stefan Monnier, 2006/08/25
- Re: python-mode: make sure output is not eaten, Slawomir Nowaczyk, 2006/08/25
- Re: python-mode: make sure output is not eaten, Stefan Monnier, 2006/08/25
- Re: python-mode: make sure output is not eaten, Slawomir Nowaczyk, 2006/08/26
- Re: python-mode: make sure output is not eaten, Stefan Monnier, 2006/08/26
- Re: python-mode: make sure output is not eaten, Slawomir Nowaczyk, 2006/08/26