[New-bugs-announce] [issue18732] IdleHistory.History: eliminate unused parameter; other cleanup.

Terry J. Reedy report at bugs.python.org
Tue Aug 13 23:20:31 CEST 2013


New submission from Terry J. Reedy:

idlelib.IdleHistory is only imported in PyShell.PyShell. History is only instantiated once, with output_sep defaulting to \n. This constant parameter and the consequence splitting and joining with \n in ._get_source and ._put_source are useless. After the tests for this class are committed in #18425, I plan to eliminate the unneeded parameter, splits, joins, and methods and inline the remaining text.get and .insert in .fetch. I want to do a few other transparent modernizations in the .fetch code, such as replacing 4 of the lines with
 pointer += -1 if reverse else 1

----------
assignee: terry.reedy
components: IDLE
messages: 195099
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IdleHistory.History: eliminate unused parameter; other cleanup.
type: performance
versions: Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18732>
_______________________________________


More information about the New-bugs-announce mailing list