Author taleinat
Recipients taleinat, terry.reedy
Date 2021-06-07.10:39:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623062392.11.0.865655964092.issue44325@roundup.psfhosted.org>
In-reply-to
Content
> 1) trailing whitespace (' ' and '\t' at least) is removed before this function is called.  I presume in IDLE rather than code.II, but cannot find where.  It is not with .rstrip.

You're probably looking for this code in EditorWindow.newline_and_indent_event():

# Strip whitespace after insert point.
while text.get("insert") in " \t":
    text.delete("insert")

See: https://github.com/python/cpython/blob/89e50ab36fac6a0e7f1998501f36fcd2872a6604/Lib/idlelib/editor.py#L1390
History
Date User Action Args
2021-06-07 10:39:52taleinatsetrecipients: + taleinat, terry.reedy
2021-06-07 10:39:52taleinatsetmessageid: <1623062392.11.0.865655964092.issue44325@roundup.psfhosted.org>
2021-06-07 10:39:52taleinatlinkissue44325 messages
2021-06-07 10:39:52taleinatcreate