[issue24403] Missing fixer for changed round() behavior

2020-09-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue24403] Missing fixer for changed round() behavior

2020-09-20 Thread Irit Katriel
Irit Katriel added the comment: Looks like this issue can be closed as rejected. -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue24403] Missing fixer for changed round() behavior

2018-06-11 Thread Tal Einat
Change by Tal Einat : -- nosy: -taleinat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24403] Missing fixer for changed round() behavior

2015-06-13 Thread Tal Einat
Tal Einat added the comment: See the existing issue and discussion about this on the six library's issue tracker (opened nearly a year ago): https://bitbucket.org/gutworth/six/issue/94/introduce-sixround -- nosy: +taleinat ___ Python tracker

[issue24403] Missing fixer for changed round() behavior

2015-06-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: The fix would be to add a 'round' function at the top of a module, after the imports. This is more the provenance of 2 3 compatibility modules, such as 6, which might have both round2 and round3 functions. -- nosy: +terry.reedy

[issue24403] Missing fixer for changed round() behavior

2015-06-07 Thread Mark Dickinson
Mark Dickinson added the comment: The old behaviour certainly can be emulated, but doing that correctly would require 4 or 5 lines of code. I don't know enough about 2to3 to know whether it can handle that sort of translation, but even if it can, I'd guess that in a good proportion of cases

[issue24403] Missing fixer for changed round() behavior

2015-06-07 Thread Mark Dickinson
Mark Dickinson added the comment: This is a bit tricky. The first expression you suggest doesn't work at all for negative numbers (e.g., producing `-3.0` for `round(-1.8)`). The second expression *mostly* works as you want, but not entirely. Some examples: def f(n): return

[issue24403] Missing fixer for changed round() behavior

2015-06-07 Thread priska
priska added the comment: Yes, those quick suggestions weren't thoroughly tested at all and turned out to be too short-sighted – thanks for checking, but are you saying the old behavior cannot be emulated or that it is not desirable to to so? --

[issue24403] Missing fixer for changed round() behavior

2015-06-07 Thread priska
New submission from priska: The behavior of the round() function has changed between Python 2.x and Python3.x. From the release notes of Python 3.0: The round() function rounding strategy and return type have changed. Exact halfway cases are now rounded to the nearest even result instead of

[issue24403] Missing fixer for changed round() behavior

2015-06-07 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24403 ___ ___ Python-bugs-list