classification
Title: IDLE - use enumerate instead of zip(count(), ...)
Type: enhancement Stage: patch review
Components: IDLE Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: kbk Nosy List: ajaksu2, gpolo, kbk, rhettinger, taleinat, terry.reedy
Priority: normal Keywords: patch

Created on 2008-07-11 22:41 by taleinat, last changed 2009-08-14 15:08 by gpolo. This issue is now closed.

Files
File name Uploaded Description Edit
IDLE_EditorWindow_minor.patch taleinat, 2008-07-11 22:41 initial patch
Messages (7)
msg69571 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2008-07-11 22:41
Just minor code cleanup.

Only one instance of zip(count(), ...) in EditorWindow.py, where I also
changed 'file' to 'file_name' to avoid overriding the built-in 'file' class.
msg69999 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2008-07-19 02:26
This looks as straightforward as patches get.
I verified that itertools.count is not used elsewhere in the file,
so it is ok to zap the import.  Suggest apply.
msg86615 - (view) Author: Daniel Diniz (ajaksu2) Date: 2009-04-26 22:12
+1 on committing this.
msg86630 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2009-04-26 23:40
I would leave the variable name unchanged.
Also, better to use rstrip than file[0:-1].
msg86631 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-04-26 23:45
I would prefer to rename it, why waste the "chance" to rename something
badly named ?

I agree on the rstrip use.
msg91549 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-08-14 13:54
Committed on r74446, will merge into py3k.
msg91555 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-08-14 15:08
> Committed on r74446, will merge into py3k.

py3k: r74450
History
Date User Action Args
2009-08-14 15:08:21gpolosetmessages: + msg91555
2009-08-14 13:54:22gpolosetstatus: open -> closed
resolution: accepted
messages: + msg91549
2009-04-26 23:45:38gpolosetmessages: + msg86631
2009-04-26 23:40:19rhettingersetnosy: + rhettinger
messages: + msg86630
2009-04-26 22:12:06ajaksu2setpriority: normal

type: enhancement
versions: + Python 3.1, Python 2.7
nosy: + ajaksu2, gpolo

messages: + msg86615
stage: patch review
2008-07-21 23:03:56amaury.forgeotdarcsetassignee: kbk
2008-07-19 02:27:05terry.reedysetnosy: + terry.reedy
messages: + msg69999
2008-07-19 02:19:24terry.reedysetcomponents: + IDLE
2008-07-11 22:41:52taleinatcreate