擅长:python、mysql、java
<p>你可以探索基类。。。</p>
<pre><code>def find_type(class_, colname):
if hasattr(class_, '__table__') and colname in class_.__table__.c:
return class_.__table__.c[colname].type
for base in class_.__bases__:
return find_type(base, colname)
raise NameError(colname)
print find_type(Arrete, 'date_arrete')
print find_type(Arrete, 'date')
</code></pre>