0

有人会列出以双下划线开头和结尾的特殊 python 属性,并简要说明其功能吗?

大致如下:

{
    "__slots__": "an iterable that restricts a set of admissible methods in a class",
    "__imul__": "*=",
    "__doc__": "docstring",
}
4

2 回答 2

3

所有这些信息都在 Python 文档的数据模型部分

于 2013-05-01T18:37:32.183 回答
2

You can look here and here (python docs) for a list. But I don't know if they are really complete lists.

于 2013-05-01T18:39:30.133 回答