"monty" < "python"

Jan Oelze jan at codein.is
Wed Mar 20 15:23:32 CET 2013


Interesting. Thanks!

On 20.03.2013, at 15:17, Ian Foote <ian at feete.org> wrote:

> On 20/03/13 13:38, Jan Oelze wrote:
> 
>> "Strings are compared lexicographically using the numeric equivalents
>> (the result of the built-in function ord()) of their characters. Unicode
>> and 8-bit strings are fully interoperable in this behavior."
> 
> This isn't true in python 3:
> 
> Python 3.2.3 (default, Oct 19 2012, 19:53:57)
> [GCC 4.7.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> b'bytes' < 'unicode'
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> TypeError: unorderable types: bytes() < str()
> 
> Ian F
> -- 
> http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list