TypeError: '

    bigL = [v[0] for v in sorted(headerTable.items(), key=lambda p: p[1])]#(sort header table)
TypeError: '<' not supported between instances of 'treeNode' and 'treeNode'

这个的意思就是比较的对象不支持小于符号

也就是我们的对象有问题,这里我的p[1]是节点类型

 headerTable:  {'p': [2, None], 'h': [1, None], 'r': [3, None], 'j': [1, None], 'z':
所以还需要对P[1]进行取值p[1][0]

欢迎关注我的公众号:小秋的博客 CSDN博客:https://blog.csdn.net/xiaoqiu_cr github:https://github.com/crr121 联系邮箱:rongchen633@gmail.com 有什么问题可以给我留言噢~
原文地址:https://www.cnblogs.com/flyingcr/p/10326926.html