摘要:
在之前的文章有提到__getattr__函数的作用: 如果属性查找(attribute lookup)在实例以及对应的类中(通过__dict__)失败, 那么会调用到类的__getattr__函数, 如果没有定义这个函数,那么抛出AttributeError异常。由此可见,__getattr__一定 阅读全文
摘要:
filter(function, iterable): Construct a list from those elements of iterable for which function returns true. 对iterable中的item依次执行function(item),将执行结果为 阅读全文