> On Mar 4, 2020, at 10:09 AM, David Mertz <me...@gnosis.cx> wrote:
> 
> 
> This thread feels very much like a solution looking for a problem.
> 
> But on one narrow point, I'm trying to think of everything in the standard 
> library or builtins that actually forms a total order with elements of the 
> same type.
> 
> * Not floats
> * I think not strings with unicode canonical equivalence, decomposition, and 
> normalization 
> * Definitely not sets, tuples, lists, dicts, etc.
> * Arguably not Decimal because it is sensitive to decimal context
> * Complex clearly not
> * I think not datetimes under timezone issues (although any ordering is 
> certainly *wrong* given the vagaries of timezones)
> * Queues, deques, etc. don't even try, nor should they
> * Do array.array's lack even a partial order?
> 
> So really I think we are left with wanting a test for whether something is 
> "int or Fraction".

I think strings do have the Total Order property, because string equality & etc 
does NOT get into the issues of Unicode canonical equivalence, I.e. the 
equality test is that they are the same sequence of code points, ignoring that 
multiple sequences of code points might be represent the same same canonical 
character, in part because there isn’t a single definition of that, as there is 
NFD/NFC and NFKD/NFKC equivalences which are different.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/7IYMILSM7OCLYYNLZK55ZDJKNIMDUMDC/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to