[Datetime-SIG] PEP-0500 (Alternative datetime arithmetic) Was: PEP 495 ... is ready ...

Tim Peters tim.peters at gmail.com
Tue Aug 18 06:59:54 CEST 2015


[Guido]
> So we're writing a PEP for two people?

Probably, but I don't think we know _which_ two people yet.  If we
also include PEP 500 along its current lines, the number may even jump
to four or five ;-)


> Will they even use it?

I can't speak for Stuart or Gustavo, but _someone_ will.

I think in somewhat the same way, e.g., Python added seemingly
hyper-general "rich comparisons" for Travis Oliphant, so he could
implement element-wise array comparisons in numpy.  The number of
people who need to know how to implement a thing has nothing to do
with how many people end up _using_ the thing - it's no indication of
the thing's importance.

Dealing with folds and gaps due to DST and base-offset transitions
only _needs_ to be done once, so, sure, in that sense PEP 495 alone is
being written for one or two people:  whoever jumps in first to
complete wrapping the Olson database with 495-compliant .utcoffset()
and .dst() implementations, and possibly overtaken by someone else who
goes on to wrap all other common sources of timezone info too.  Once
the common sources _are_ all wrapped, who else would bother to
duplicate the work?  There's no point to it beyond personal amusement.
I expect the number of people who truly want to implement their own
non-Olson non-Microsoft non-POSIX-TZ non-VTIMEZONE
offset-from-POSIX-approximation-to-UTC timezones is exactly zero.

Honest:  do _you_ believe there are more than two people in the world
who are motivated enough to do all that work?  It's tedious.  I expect
that's why, however many people may have started down that path, only
two packages finished it.

The doesn't mean the packages aren't important.  pytz and dateutil are
already widely used, despite fighting a design gap PEP 495 aims to
fill.  My bet is that at least Stuart would love to throw out all the
under-the-cover complications pytz added to worm around it.  But I
don't know; e.g., maybe he's plain burned out on it.  But _someone_
will still have - or generate - sufficient enthusiasm :-)


More information about the Datetime-SIG mailing list