[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2018-02-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2018-02-26 Thread miss-islington
miss-islington added the comment: New changeset f8a3485dcd41a00c5e99c5be6adc67cb2638b366 by Miss Islington (bot) in branch '3.7': Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624) https://github.com/python/cpython/commit/f8a3485dcd41a00c5e99c5be6adc67cb2638

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2018-02-26 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +5678 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2018-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3f2e6f15d64d81633b1fc0b308afc0d6e9026b61 by Serhiy Storchaka in branch 'master': Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624) https://github.com/python/cpython/commit/3f2e6f15d64d81633b1fc0b308afc0d6e90

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What will you say Raymond? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-07-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Why do you think that adding an unnecessary list comprehension around tuple() > call makes them better? I just restore the original code because I don't think the changes make it better. > Also, I don't think you should be able to override and revert all

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-07-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Why do you think that adding an unnecessary list comprehension around tuple() call makes them better? Also, I don't think you should be able to override and revert all the judgments I made when carefully reviewing all the OP's PR. You are NOT the sole arbi

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-07-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since some changes looks worse than the old code to me (see my comments on GitHub), I have created PR 2624 which reverts changes with which I disagree or applies alternate changes. -- resolution: fixed -> stage: resolved -> patch review status: clos

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-07-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2690 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: I made a note of the idlelib.multicall changes for when I review the module to modernize and test. -- ___ Python tracker ___ __

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, the PR was merged while I made a review. tuple([i for i in a]) is 2 times faster than tuple(i for i in a). Since there is no significant difference in readability I would keep the variant with a list comprehension if it is initial. -- _

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-18 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-b

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 3972628de3d569c88451a2a176a1c94d8822b8a6 by Raymond Hettinger (Jon Dufresne) in branch 'master': bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489) https://github.com/python/cpython/commit/3972628de3d569c88451a2a176a1c94d8822b8

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, the latest version of this PR looks okay to me. Do you care to veto any of the remaining suggested changes? -- assignee: rhettinger -> serhiy.storchaka ___ Python tracker

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: Yes, please do keep any proposed idlelib changes separate. Also, I don't any of these to be backported (it is stylistic and not about bugs). -- ___ Python tracker

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: As I said on review, I want idlelib changes either not made or in a separate patch that can be backported as is. Partial backport/cherry-picks are a major nuisance. I don't know if anything else should be treated similarly. -- nosy: +terry.reedy ___

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Jon, we usually try to avoid sweeping changes across the library and instead preference to focus on one module at a time (Guido calls this "holistic refactoring"). There is a risk of introducing bugs and of destabiliizing code that has sat untouched but wo

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: * Some functions that accept an arbitrary iterable first convert it to temporary list and iterate that list. In these cases there is no significant difference in memory usage between list comprehension and generator, but the variant with list comprehension i

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: Is this unnecessary code churn? That's not a rhetorical question. Fixing code that isn't broken is not always a good idea. ``func()`` is not always identical to ``func()``, there are situations where there is a significant performance difference between the

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-07 Thread Jon Dufresne
New submission from Jon Dufresne: Lib has some patterns that could be easily discovered and cleaned up. Doing so will reduce the number of unnecessary temporary lists in memory and unnecessary function calls. It will also take advantage of Python's own rich features in a way that better dog fo