tool.py如下
class util:
def __init__(self):
self.name = "util"
bmodule.py如下:
from aa.tool import util
u = util()
print(u.name)
print(u.__module__) # u是来自哪个模块
print(u.__class__) # u是由哪个类产生
tool.py如下
class util:
def __init__(self):
self.name = "util"
bmodule.py如下:
from aa.tool import util
u = util()
print(u.name)
print(u.__module__) # u是来自哪个模块
print(u.__class__) # u是由哪个类产生