[Idle-dev] [ idlefork-Patches-681992 ] Better indentation after first line of string continuation

SourceForge.net noreply@sourceforge.net
Thu, 06 Feb 2003 15:23:35 -0800


Patches item #681992, was opened at 2003-02-07 01:23
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309579&aid=681992&group_id=9579

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Noam Raphael (noamr)
Assigned to: Nobody/Anonymous (nobody)
Summary: Better indentation after first line of string continuation

Initial Comment:
This is a fix for Jeffrey Stephens' bug report:

--------------------
From: Jeffrey Stephens <jsteve17@tampabay.rr.com>
Organization: Home User
To: idle-dev@python.org
Date: Mon, 3 Feb 2003 23:12:49 -0500
Subject: [Idle-dev] Bug in Idlefork 0.9a2

Executing the following code in the Python Shell window -

>>> print \
           "Snake Ey\
           es"

produces output

Snake Ey      es

Six spaces are inserted between the 'y' and 'e' in eyes.

This works fine in a terminal window.

Regards,
Jeff Stephens=20
-----------------------

The problem is that when IDLE detects string
continuation, it indents the new line in the same way
as the previous one. This makes sense if you are in the
middle of a string, so the indentation of the previous
line is a part of the string, but if the string starts
at the current line, the indentation of the line is
meaningless.
The patch fixes that; if the string was started at the
current line, no indentation at all is applied.

I hope this helps a little,
Noam

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

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