考虑以下代码片段。
class MyClass(object):
@property
def foo(self):
return self._foo
l = [my_class1, my_class2]
min(l, key=MyClass.foo) # doesn't work because foo is not callable.
# "TypeError: 'property' object is not callable"
有没有办法让它工作?