[issue45975] Simplify some while-loops with walrus operator

2022-02-03 Thread miss-islington
miss-islington added the comment: New changeset cf7cb1a2bf40516dc571d1d90c12b632dcd9b8c8 by Miss Islington (bot) in branch '3.9': bpo-45975: IDLE - Remove extraneous parens (GH-31107) https://github.com/python/cpython/commit/cf7cb1a2bf40516dc571d1d90c12b632dcd9b8c8 -- _

[issue45975] Simplify some while-loops with walrus operator

2022-02-03 Thread miss-islington
miss-islington added the comment: New changeset 63523e7b2a631f28134b25a8063d50e08c741db6 by Miss Islington (bot) in branch '3.10': bpo-45975: IDLE - Remove extraneous parens (GH-31107) https://github.com/python/cpython/commit/63523e7b2a631f28134b25a8063d50e08c741db6 --

[issue45975] Simplify some while-loops with walrus operator

2022-02-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +29293 pull_request: https://github.com/python/cpython/pull/31110 ___ Python tracker ___ __

[issue45975] Simplify some while-loops with walrus operator

2022-02-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +29292 pull_request: https://github.com/python/cpython/pull/31109 ___ Python tracker ___ __

[issue45975] Simplify some while-loops with walrus operator

2022-02-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 916d0d822c79933f4c420f7a36f16f3eb788646b by Terry Jan Reedy in branch 'main': bpo-45975: IDLE - Remove extraneous parens (GH-31107) https://github.com/python/cpython/commit/916d0d822c79933f4c420f7a36f16f3eb788646b -- _

[issue45975] Simplify some while-loops with walrus operator

2022-02-03 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +29290 pull_request: https://github.com/python/cpython/pull/31107 ___ Python tracker ___ __

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset fafd2dadf63973a04f5693e5be19f3e7521c10d4 by Terry Jan Reedy in branch '3.9': [3.9] bpo-45975: Use walrus operator for some idlelib while loops (GH-31083) https://github.com/python/cpython/commit/fafd2dadf63973a04f5693e5be19f3e7521c10d4 ---

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +29277 pull_request: https://github.com/python/cpython/pull/31092 ___ Python tracker ___ __

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset 2ddc278875f789de622262ee8ff5a1c3788f031c by Miss Islington (bot) in branch '3.10': bpo-45975: Use walrus operator for some idlelib while loops (GH-31083) https://github.com/python/cpython/commit/2ddc278875f789de622262ee8ff5a1c3788f031c ---

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +29276 pull_request: https://github.com/python/cpython/pull/31091 ___ Python tracker _

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 51a95be1d035a717ab29e98056b8831a98e61125 by Nick Drozd in branch 'main': bpo-45975: Use walrus operator for some idlelib while loops (GH-31083) https://github.com/python/cpython/commit/51a95be1d035a717ab29e98056b8831a98e61125 -- _

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread Nick Drozd
Change by Nick Drozd : -- keywords: +patch pull_requests: +29267 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31083 ___ Python tracker ___ _

[issue45975] Simplify some while-loops with walrus operator

2022-01-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: To me, the five idlelib changes make the code easier to understand. Nick, please either move them into a separate PR or allow me to do so, and subject to manual testing, I will merge and backport. (I requested this on the PR by maybe you missed it.) If th

[issue45975] Simplify some while-loops with walrus operator

2021-12-04 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue45975] Simplify some while-loops with walrus operator

2021-12-04 Thread Nick Drozd
Nick Drozd added the comment: > Is there any measurable performance benefit from this? I wouldn't expect any performance changes either way. If it worked out to be slower, that would an unpleasant surprise and a good reason to reject this change. If it worked out to be faster, well, that wou

[issue45975] Simplify some while-loops with walrus operator

2021-12-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > As I mentioned in the PR, merging this can make future > backports to 3.6 and 3.7 more complicated. That's correct, but it is also true that we do very few of those and the likelihood of a conflict with one of these edits is low. -- ___

[issue45975] Simplify some while-loops with walrus operator

2021-12-04 Thread Irit Katriel
Irit Katriel added the comment: As I mentioned in the PR, merging this can make future backports to 3.6 and 3.7 more complicated. -- nosy: +iritkatriel ___ Python tracker ___

[issue45975] Simplify some while-loops with walrus operator

2021-12-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: The general rule as stated by Zachary is correct; however, I'm in mildly favor of this PR because these are the use cases that the walrus operator was specifically designed for. That said, it would be nice to verify that timings don't get worse and to ca

[issue45975] Simplify some while-loops with walrus operator

2021-12-03 Thread Zachary Ware
Zachary Ware added the comment: As a general rule, refactorings like this tend to be rejected as the risk of inadvertently adding a new bug outweighs the benefit of subjectively cleaner code ("if it ain't broke, don't fix it!"). Is there any measurable performance benefit from this? Reducing

[issue45975] Simplify some while-loops with walrus operator

2021-12-03 Thread Nick Drozd
New submission from Nick Drozd : The following pattern occurs a few times in the codebase: while 1: data = conn.recv(blocksize) if not data: break ... There is an unbounded while loop in which some kind of input is read. If the input is there, it is processed and