[issue31417] Use the enumerate function where appropriate

2017-09-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31417] Use the enumerate function where appropriate

2017-09-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread Vedran Čačić
Vedran Čačić added the comment: Sorry, this seems like a classical example of "When all you have is a hammer, everything looks like a nail. Then, when you learn of a screwdriver, you suddenly see half of these nails as screws, completely ignoring there are other tools besides those two." In f

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread R. David Murray
R. David Murray added the comment: Mark: Yeah, I think my comment was directed more to haypo than you :) -- ___ Python tracker ___ __

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread Mark Byrne
Mark Byrne added the comment: Generally, we consider the danger of introducing bugs to be more significant than the benefit of the "cleanup" changes. The fact that you are discussing further changes to the code in the PR make this more likely. I haven't updated the PR with further code change

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with David in general. And as you can see there are questions to the concrete patch. -- nosy: +serhiy.storchaka ___ Python tracker

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread R. David Murray
R. David Murray added the comment: Anyone who uses stdlib code as examples of best practice doesn't understand the history of stdlib code. Generally, we consider the danger of introducing bugs to be more significant than the benefit of the "cleanup" changes. The fact that you are discussing

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread STINNER Victor
STINNER Victor added the comment: > Thanks for wanting to improve Python, but we don't usually accept refactoring > requests like this. We "fix" such issues when the code is touched for other > reasons. We'll see what other developers think, though. The standard library is used by some devel

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread R. David Murray
R. David Murray added the comment: Thanks for wanting to improve Python, but we don't usually accept refactoring requests like this. We "fix" such issues when the code is touched for other reasons. We'll see what other developers think, though. -- nosy: +r.david.murray _

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread Roundup Robot
Changes by Roundup Robot : -- keywords: +patch pull_requests: +3490 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread Mark Byrne
New submission from Mark Byrne: To make code explicit and more readable Use the enumerate function to replace occurrences of the pattern: for i in range(len(sources)): src = sources[i] -- messages: 301871 nosy: Mark Byrne priority: normal severity: normal status: open title: Use th