[Idle-dev] [ idlefork-Bugs-695861 ] Unnecessary blank line triggered by continuation in Shell

SourceForge.net noreply@sourceforge.net
Sun, 02 Mar 2003 09:52:16 -0800


Bugs item #695861, was opened at 2003-03-02 03:40
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109579&aid=695861&group_id=9579

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: David Harris (edcdave)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unnecessary blank line triggered by continuation in Shell

Initial Comment:
Windows XP, IDLEfork 0.9a2, Python 2.2.2

The following interactive session generates an 
unexpected blank line:

>>> word = 'letters'
>>> for c in word: print c,
                        # continuation line, pressed Enter
l e t t e r s
>>> 'h' in word
                       # unexpected blank line
0
>>> 'e' in word
1
>>>


IDLE 0.8 does not generate the unexpected blank line. 
The behavior seems to be triggered by a prior need for a 
continuation line.

----------------------------------------------------------------------

>Comment By: David Harris (edcdave)
Date: 2003-03-02 17:52

Message:
Logged In: YES 
user_id=72287

I think I understand. The comma is contributing to the 
behavior, but I'm not sure that's the whole story. For example,

>>> print "test",
test
>>> print "test"
 test
>>> print "test"
test

The second output has a leading space (induced by the first 
command?). But why didn't I get a blank line like the original 
example?

My apologies for submitting what seems to be a superficial 
bug. I'm very new to Python, but I have 20 years experience 
in C and others. When I saw the on-again/off-again behavior of 
the blank line, I imagined a situation where a variable was not 
reset (which could have a wider impact than the display).

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2003-03-02 12:51

Message:
Logged In: YES 
user_id=6380

It's not a continuation line. More likely it's that the
subprocess where your code runs has an unterminated output
line for which both it and IDLE's stdout provide an extra
newline at some later point.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109579&aid=695861&group_id=9579