在某些设置操作期间,我在Python中遇到此错误:
TypeError: unhashable type: 'InstrumentedList'
Run Code Online (Sandbox Code Playgroud)
什么是InstrumentedListPython?我只找到了一些与SQLAlchemy相关的引用.这是列表中的SQLAlchemy实现还是什么?
顺便说一下,它在执行时发生:
set(self.some_list)
Run Code Online (Sandbox Code Playgroud)
哪里
print type(self.some_list) # <type 'list'>
Run Code Online (Sandbox Code Playgroud)
是的,它是SQLAlchemy API的一部分.这是类引用: