On Fri, Sep 11, 2015 at 9:51 PM, Glenn Linderman <v+pyt...@g.nevcal.com> wrote:
> It wasn't intended to argue for not defining the operations, just intended > to justify that it is partial ordering... It is not even that. Note that even partial ordering still requires transitivity of <=, but we don't have that in datetime: >>> from datetime import * >>> from datetimetester import Eastern >>> UTC = timezone.utc >>> a = datetime(2002, 4, 7, 1, 40, tzinfo=Eastern) >>> b = datetime(2002, 4, 7, 2, tzinfo=Eastern) >>> c = datetime(2002, 4, 7, 6, 20, tzinfo=UTC) >>> a <= b <= c True >>> a <= c False The above session is run in the currently released python. The Eastern timezone implementation is imported from the CPython test suit. The fact that transitivity of <= is already broken gives me little comfort because pretty much everything involving "problem times" is currently broken and users expect that. PEP 495, however, is expected to fix the issues with the problem times and not just replace one broken behavior with another.
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com