我在寻找一组很好的哨兵值,例如实验:
[] > "sdfasfg" > ()
这似乎有记载:
CPython implementation detail: Objects of different types except numbers are ordered by their type names; objects of the same types that don’t support proper comparison are ordered by their address. reference
以同样的方式
^{pr2}$“最大”的内置类型似乎是unicode
,我可以用什么作为与unicode类型比较的“正确”哨兵值?这个值比任何unicode字符串都大?在
在Python中,内置类型实例的比较顺序是否定义得很好?在
对任意对象的比较称为“丰富的比较”。有一些文档here,和{a2}。在
如果您使用的是python3,那么检查这个out。相关引述:
相关问题 更多 >
编程相关推荐