摘要: 如果一个模块文件中有__all__ 变量,当使用from xxx import * 导入时,只能导入这个列表中的元素。 my_module2模块代码 # 定义多个功能,把某个功能添加到__all__ __all__ = ['testA'] def testA(): print('testA') de 阅读全文
posted @ 2022-12-25 23:16 㞢卄BYZ 阅读(56) 评论(0) 推荐(0)