[issue36039] Replace append loops with list comprehensions

2019-02-25 Thread Lukas Geiger
Lukas Geiger added the comment: Thank you very much for your thorough explanation, totally makes sense. -- ___ Python tracker ___ _

[issue36039] Replace append loops with list comprehensions

2019-02-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with all the other -1 comments and will mark this a closed. FWIW, we generally discourage sweeping across the library with minor rewrites. Guido articulated a principle of "holistic refactoring" where we make code improvements while working on t

[issue36039] Replace append loops with list comprehensions

2019-02-19 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: In some places, using a lot is also a deliberate choice to improve readability. I think the boy scout rule is more appropriate for such changes. -- nosy: +remi.lapeyre ___ Python tracker

[issue36039] Replace append loops with list comprehensions

2019-02-19 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Agreed with @p-ganssle . Similar issue33152 in the past for the refactoring in timeit module to use list comprehension. Large refactorings like this could also make git blame little more difficult in places where this has less benefit like smaller

[issue36039] Replace append loops with list comprehensions

2019-02-19 Thread Paul Ganssle
Paul Ganssle added the comment: I think I'm -1 on a general project or policy to replace all for-append loops with list comprehensions, but I'm generally positive about individual improvements to the code base, on a case-by-case basis. I can't speak for anyone but myself, but I imagine that

[issue36039] Replace append loops with list comprehensions

2019-02-19 Thread Lukas Geiger
New submission from Lukas Geiger : Lib uses loops to append to a new list in quite a few places. I think it would be better to replace those with list comprehensions. Benefits of this change: - List comprehensions are generally more readable than appending to a newly created list - List co