[issue829370] math.signum(int)

Frank report at bugs.python.org
Wed Mar 14 10:23:30 CET 2012


Frank <frank.breitling at gmx.de> added the comment:

Mark, https://en.wikipedia.org/wiki/Signum_function or elementary math books tell us that this function is called signum, sign or sgn.
A library should adopt this standard for the same reason we don't want a ComputeTheSine or calcsin, which would be very confusing.

As we learn from repeated discussions people want to use this signum function, no matter we can imagine this or not and no matter whether that functionality is hidden somewhere else.

Since we are talking about not more than 5 lines of code, I don't see any reason not to have it. If there are some please let us know.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue829370>
_______________________________________


More information about the Python-bugs-list mailing list