摘要: from types import MethodType,FunctionType def check(arg): """ 检查arg是方法还是函数? :param arg: :return: """ # if isinstance(arg,MethodType): # print('arg是一个方法') # elif is... 阅读全文
posted @ 2018-08-30 21:54 中杯可乐不加冰 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 三、反射方法在面向对象中的应用 简单事例: 用反射方法完成简单的登陆、退出、注销功能: 阅读全文
posted @ 2018-08-30 21:32 中杯可乐不加冰 阅读(725) 评论(0) 推荐(0) 编辑