类型错误:无序类型:dict()<dict()

2024-09-28 17:06:02 发布

您现在位置:Python中文网/ 问答频道 /正文

我对python完全不熟悉,我有一个脚本可以产生这个错误

for a in sorted([p for p in PRODUCERS.Get('PartitionName="{}"'.format(partition)) 
                 if p["SignalName"] not in EXCLUDED_SIGNALS]):
TypeError: unorderable types: dict() < dict()

这个脚本是用Python2.7编写的,我使用的是3.5(32位),有什么变化吗?在

函数如下:

^{pr2}$

Tags: in脚本formatforgetif错误not