查找所有双下划线变量的列表?

查找所有双下划线变量的列表?,第1张

查找所有双下划线变量的列表?

如果要查看魔术名称是否已记录,请转到Lib目录并运行:

egrep -oh '__[A-Za-z_][A-Za-z_0-9]*__' *.py | sort | uniq

产生:

'__all__''__args__''__author__''__bases__''__builtin__''__builtins__''__cached__''__call__''__class__''__copy__''__credits__''__date__''__decimal_context__''__deepcopy__''__dict__''__doc__''__exception__''__file__''__flags__''__ge__''__getinitargs__''__getstate__''__gt__''__import__''__importer__''__init__''__ispkg__''__iter__''__le__''__len__''__loader__''__lt__''__main__''__module__''__mro__''__name__''__package__''__path__''__pkgdir__''__return__''__safe_for_unpickling__''__setstate__''__slots__''__temp__''__test__''__version__'


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5645635.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存