有人会列出以双下划线开头和结尾的特殊 python 属性,并简要说明其功能吗?
大致如下:
{
"__slots__": "an iterable that restricts a set of admissible methods in a class",
"__imul__": "*=",
"__doc__": "docstring",
}
有人会列出以双下划线开头和结尾的特殊 python 属性,并简要说明其功能吗?
大致如下:
{
"__slots__": "an iterable that restricts a set of admissible methods in a class",
"__imul__": "*=",
"__doc__": "docstring",
}
所有这些信息都在 Python 文档的数据模型部分
You can look here and here (python docs) for a list. But I don't know if they are really complete lists.