def _type_affinity(self):
"""Return a rudimental 'affinity' value expressing the general class
of type."""
typ = None
for t in self.__class__.__mro__:
if t is TypeEngine or t is UserDefinedType:
return typ
elif issubclass(t, TypeEngine):
typ = t
else:
return self.__class__
评论列表
文章目录