time, calendar, datetime, etc
bignose-hates-spam at and-benfinney-does-too.id.au
Fri Aug 1 10:37:44 CEST 2003
On Thu, 31 Jul 2003 22:47:27 -0600, Andrew Dalke wrote:
> Why would supporing you be reasonable to the other 99+% of the
> users who don't care about doing astronomical measurements
It is astronomy (and, before it, astrology) that has driven the
standardisation of time for many centuries; anyone wanting to use a
standardised time system is using one based on astronomical imperatives.
> even about the "was there a year 0?" debate.
Anyone who wants to deal with dates BC (in the Gregorian calendar) cares
about the "was there a year 0?" question (answer: not in the Gregorian
calendar, there wasn't).
So it seems you're dismissing a large sector of users: those who deal
with dates before 1AD, and those who want to use worldwide date/time
> Python's datetime module doesn't allow [more than 60 seconds in a
> And if it did, it would almost certainly break code written by people
> who didn't know there could be 61 seconds in a minute.
Such people would run into trouble when leap seconds occurred anyway;
keeping the datetime module ignorant of it just means the problems will
not be dealt with when the program is designed (when it is easy to
correct) but rather be thrust in their face when a leap second occurs
(presumably when the program has been long forgotten about and the
original programmer possibly departed).
> So in summary, almost no one needs the functionality beyond what the
> standard library has, supporting each and every specialized niche
> makes for more complex code, and more complex code means people who do
> "normal" programming are much more likely to run into problems and
> make the code more likely to break.
Quite the reverse. If the standard library supported things like leap
seconds, absence-of-year-zero, and Julian dates, it would be wrapped up
in one place where programmers could use it without having to know about
the implementation complexities.
\ "Anything that is too stupid to be spoken is sung." -- Voltaire |
Ben Finney <http://bignose.squidly.org/>
More information about the Python-list