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

Chris Angelico rosuav at gmail.com
Sun Sep 13 17:05:47 CEST 2015


On Sun, Sep 13, 2015 at 7:03 PM, Laura Creighton <lac at openend.se> wrote:

In a message of Sat, 12 Sep 2015 20:49:12 -0400, Terry Reedy writes:

and, if we are stuck with <-intransitivity, what do we do? If back-compatibility allowed, I might suggest defining 'lt' or 'less' rather than 'lt' so that sort and bisect don't work with DateTimes. Then document that the function is not transitive. I think it would be better to document what you are supposed to do if you have a list of DateTimes and want to sort them, as a way to get a list of times sorted from the earliest to the latest.

What I'd like to hear (but maybe this won't be possible) would be "less-than is transitive if and only if ", where might be something like "all of the datetimes are in the same timezone" or "none of the datetimes fall within a fold" or something. That would at least make sorting possible, but maybe with a first-pass check to ensure transitivity.

Vain hope or plausible restriction?

ChrisA



More information about the Python-Dev mailing list