[Python-Dev] PEP 495 Was: PEP 498: Literal String Interpolation is ready for pronouncement

Alexander Belopolsky alexander.belopolsky at gmail.com
Sat Sep 12 05:02:10 CEST 2015


On Fri, Sep 11, 2015 at 10:22 PM, Guido van Rossum <gvanrossum at gmail.com>
wrote:

> I think we're getting into python-ideas territory here...


Well, a violation of transitivity of <= in the current CPython
implementation may be considered a bug by some.  This makes this discussion
appropriate for python-dev.  We could discuss this on Datetime-SIG, but I
think the question is more broad than just datetime.

When is it appropriate for Python operators to violate various mathematical
identities?  We know that some violations are unavoidable when you try to
represent real numbers in finite size objects, but when you effectively
deal with a subset of integers, what identities are important and what can
be ignored for practical reasons?

Intuitively, I feel that the hash invariant and the reflexivity and
transitivity of == are more important than say distribution law for + and
*, but where does it leave the transitivity of <=?  Is it as important as
== being an equivalence, or it's a nice to have like the distribution law?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150911/3acaf626/attachment.html>


More information about the Python-Dev mailing list