我想得到这样的东西。该示例的最后一行显示了我想如何调用列-但是如何实现它?
谢谢
class db(object):
def __init__(self, name):
self.name = name
self.connection....
self.connection.cursor....
class db_table(object):
def __init__(self, name):
self.name = name
def columns(self):
return ....
main = db("Main")
sheet = main.db_table("sheet")
headers = main.sheet.columns()