On Wed, Sep 9, 2015 at 5:10 PM, Tim Peters <[email protected]> wrote: [in the "Making dt parameter of timezone.tzname(dt) optional" thread] > > Only if PEP 495 adds an obviously needed tzifno.classify(self, dt) > method so that ordinary users don't have to become implementation > experts to answer questions about datetimes that aren't about > implementation details ;-)
Deal! But the return values of classify() should be -1 (for gap), 0 (for regular) and 1 (for fold). And while we are at it, let's bring back the builtin cmp() method because all these cryptic >, < and == are just too confusing. :-) Seriously, though, I have no objection to the classify() method, but someone else will have to design it and carry through the unavoidable bikeshedding rounds. My goal in PEP 495 is to draw a straight line between the current state of affairs and a lossless astimezone(). Niceties like classify() are just a little off that path. I had no illusions when I started PEP 495 that it would be as easy as it sounds (just add one measly bit!) Still, I did not anticipate all the subtle issues that would have to be resolved. So rather than proposing more features that are not strictly necessary, I would like to ask the group to start kicking the tires on the reference implementation. [1] [1]: https://github.com/abalkin/cpython/tree/issue24773-s3
_______________________________________________ Datetime-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/datetime-sig The PSF Code of Conduct applies to this mailing list: https://www.python.org/psf/codeofconduct/
