[Interest] QVariant compare operator

Florian Bruhin me at the-compiler.org
Mon Apr 20 11:28:48 CEST 2020


On Sun, Apr 19, 2020 at 12:42:16PM -0300, Thiago Macieira wrote:
> On Sunday, 19 April 2020 09:39:40 -03 André Pönitz wrote:
> > > What about non-integral types?
> > 
> > They are compared by typeName(). So any QChar would be less-than any
> > QRegularExpression.
> 
> We can order by type, but I don't think we should. But that's a choice.

FWIW that's the choice Python had taken with Python 2 (ordering different types
by their type name). It was widely regarded as a bad decision and replaced by a
TypeError exception in Python 3.

Florian

-- 
me at the-compiler.org (Mail/XMPP) | https://www.qutebrowser.org 
       https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
       GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
             I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200420/b813f06e/attachment.sig>


More information about the Interest mailing list