def demo(): '''this is for test dir''' print("Hello,world") for item in dir(demo): print(item) print(demo.__doc__)
python-dir查询任意对象的属性和方法
最新推荐文章于 2024-02-23 18:30:38 发布
def demo(): '''this is for test dir''' print("Hello,world") for item in dir(demo): print(item) print(demo.__doc__)