[New-bugs-announce] [issue27452] IDLE: Cleanup config code

Terry J. Reedy report at bugs.python.org
Mon Jul 4 16:09:51 EDT 2016


New submission from Terry J. Reedy:

The config module code can be improved even without changing behavior. While working on #27380, I noticed these two:

IdleUserConfParser.RemoveFile is a simple one-liner called once.  Put it inline.

IdleConf.CreateConfigHandlers: A) As near as I can tell, __file__ is now always the absolute path of the file regardless if executed directly or imported.  B) Creating two dicts of file names that are immediately used and deleted is useless and to me makes the code less readable.

I intend these changes only for 3.6 and will not apply until after the new unix keys patch.  Serhiy, have you noticed any similar cleanups that would be appropriate to add?

----------
assignee: terry.reedy
files: config-clean.diff
keywords: patch
messages: 269809
nosy: serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: Cleanup config code
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43623/config-clean.diff

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


More information about the New-bugs-announce mailing list