__getattr__ demo,__getattr_demo,class empty:
__getattr__ demo,__getattr_demo,class empty:
class empty: def __getattr__(self, attrname): if attrname == 'age': return 41 else: raise AttributeError, attrnameX = empty()print X.age
相关内容
- python实现连接两个url,python实现url,import urlpa
- dns反向解析,根据ip获得域名方法,dns域名,import sys,
- Virtual function in Python,virtualpython,class Super:
- python的iterator object,pythoniterator,class Square
- python获得系统中所有的挂载点,python获得系统挂载,#
- Class method: __init__ and __call__,__init___call_,class Prod:
- Python调用system命令,python调用system,import osos.
- python http上传文件处理示例,python上传文件,<HTML>
- 动态修改python的系统路径,动态python路径,import syssy
- python判断字符串中是否包含某个字符,python字符串,my
评论关闭