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 <rep...@bugs.python.org> <http://bugs.python.org/issue18732> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com