摘要:
##staticmethod staticmethod 只能作为函数装饰器应用。其作用为将一个函数转换为静态方法。下面一段代码中,若不在def get(argv1)上添加装饰器staticmethod. 在执行代码test.get("hello") 将会出现 TypeError: get() tak 阅读全文
摘要:
最近看Robotframe中SeleniumLibrary 源码,发现源代码中存在许多@property,因此看下python中内置的装饰器。 简言之,python 内置的装饰器常见为3个 ,分别为@property 、@classmethod和@staticmethod。 ##property 源 阅读全文