This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fkbreitl
Recipients fkbreitl, gekonntde, georg.brandl, mark.dickinson, rhettinger, valhallasw
Date 2012-03-15.15:56:27
SpamBayes Score 9.603429e-15
Marked as misclassified No
Message-id <1331826988.44.0.15905225144.issue829370@psf.upfronthosting.co.za>
In-reply-to
Content
Unfortunately my reply to the list lost all quotes, so I try to answer again through the web interface:
---

> I'm not quite sure why that formula would be "elegant" in the first place,

Because its short.

> and I most certainly don't understand why 0.5*sign((100*YY)+MM-190002.5) + 0.5 is more elegant ...

Because the former is a proper mathematical expression, while the latter is python jargon with limited use elsewhere.

> or rather: implementing leap years correctly in the first place, so the formula also works outside of the 1800-2099 range.

Exactly, why is there no correct implementation of Julian date in python time or datetime?
For most practical purposes I can understand why most people would consider the above formula most useful and most elegant.

> And, in general, I don't understand the problem. Everyone who does scientific computing has numpy *anyway*, so there is no gain for them.

Then what's the math module good for?

> 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

So what? Is this the law of Moses? Or should we fall back to Assebmly?
Python is supposed to be a high-level language not a stone age tool.

However, I am glad you found at least another reason convincing to have this function.

Cheers!
History
Date User Action Args
2012-03-15 15:56:28fkbreitlsetrecipients: + fkbreitl, georg.brandl, rhettinger, mark.dickinson, gekonntde, valhallasw
2012-03-15 15:56:28fkbreitlsetmessageid: <1331826988.44.0.15905225144.issue829370@psf.upfronthosting.co.za>
2012-03-15 15:56:27fkbreitllinkissue829370 messages
2012-03-15 15:56:27fkbreitlcreate