python – 参数如何通过__getattr__传递给一个函数

python – 参数如何通过__getattr__传递给一个函数

考虑下面的代码示例( python 2.7): class Parent: def __init__(self, child): self.child = child def __getattr__(self, attr): print(Calling __getattr__: +attr) if hasattr(self.ch

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部