Python: Create __hash__ and comparison functions compactly?

后端 未结 0 514
失恋的感觉
失恋的感觉 2021-01-15 19:22

As pointed out in __key__ parameter for classes in Python, Python3.x has functools.total_ordering, but it still requires manually implementing __lt__

相关标签:
回答
  • 消灭零回复
提交回复
热议问题