可用于返回类的文档字符串的属性是( )。
A. __dict__
B. __bases__
C. __doc__
D. __class__
有如下代码。class test:__x=1a=test()执行上述代码后,再执行下列选项中的语句,会出错的是( )。
A. a.__x=100
B. test.__x=100
C. print(test.__x)
D. print(test._test__x)
执行下面代码的输出结果是( )。class test:__data=0a=test()__data=10a._test__data=20test.__data=30print(test._test__data)
A. 0
B. 10
C. 20
D. 30
下列关于Python类的静态方法的说法错误的是( )。
A. 静态方法必须用@staticmethod进行声明
B. 类对象和实例对象调用静态方法的方式完全相同
C. 静态方法可以没有参数
D. 静态方法必须提供返回值