[issue39237] Redundant call to round in delta_new

2020-01-08 Thread Alex Henrie
Alex Henrie added the comment: Thank you! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue39237] Redundant call to round in delta_new

2020-01-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 998c54948a29cf5bd8bfa49f973f1ce5855004a0 by Victor Stinner (Alex Henrie) in branch 'master': bpo-39237, datetime: Remove redundant call to round from delta_new (GH-17877) https://github.com/python/cpython/commit/998c54948a29cf5bd8bfa49f973f1ce58

[issue39237] Redundant call to round in delta_new

2020-01-08 Thread STINNER Victor
STINNER Victor added the comment: Thanks Alex Henrie, I merged your PR. I don't think that it's worth it to backport such cleanup change to stable branches. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python

[issue39237] Redundant call to round in delta_new

2020-01-06 Thread Alex Henrie
Change by Alex Henrie : -- keywords: +patch pull_requests: +17293 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17877 ___ Python tracker ___

[issue39237] Redundant call to round in delta_new

2020-01-06 Thread Alex Henrie
New submission from Alex Henrie : The delta_new function in _datetimemodule.c currently contains the following code: /* Round to nearest whole # of us, and add into x. */ double whole_us = round(leftover_us); int x_is_odd; PyObject *temp; whole_us = round(leftover_us); Th