def get_table(self, table_name: str) -> 'typing.Type[Table]':
"""
Gets a table from the current metadata.
:param table_name: The name of the table to get.
:return: A :class:`.Table` object.
"""
try:
return self.tables[table_name]
except KeyError:
# we can load this from the name instead
for table in self.tables.values():
if table.__name__ == table_name:
return table
else:
return None
评论列表
文章目录