Merlijn van Deen <valhall...@gmail.com> added the comment: I'm not quite sure why that formula would be "elegant" in the first place, and I most certainly don't understand why
0.5*sign((100*YY)+MM-190002.5) + 0.5 is more elegant than ((100*YY)+MM > 190002.5) or (((YY = 1900) and (MM > 2.5)) or (YY > 1900)) or rather: implementing leap years correctly in the first place, so the formula also works outside of the 1800-2099 range. And, in general, I don't understand the problem. Everyone who does scientific computing has numpy *anyway*, so there is no gain for them. As a last note, the C math.h also doesn't have a sign() function, and only a copysign() function: http://en.wikipedia.org/wiki/C_mathematical_functions ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue829370> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com