When run on this code: class Clazz(object):
def changeType(self, newClass):
self.__class__ = newClass
pylint issues this message:
C0103: 4:Clazz.changeType: Invalid name "__class__" (should match _?_?[a-z][a-zA-Z0-9]{1,30}$)
It is true that the name "__class__" does not match the configured naming convention. However, since it is a builtin Python name, changing the name is not possible. | |
| priority | normal |
|---|---|
| type | bug |
| appeared in | <not specified> |
| done in | 0.19.0 |
| load | 0.000 |
| load left | 0.000 |
| closed by | <not specified> |


#9332 Same W0201 reported multiple times