Mark Dickinson <dicki...@gmail.com> added the comment: N.B. There's already logic for doing div_nearest (i.e., divide one integer by another, returning the closest integer to the result) in the long_round function in Objects/longobject.c. It might be worth pulling that logic out and making it available in a _Py function so that it can be reused in other modules.
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1289118> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com