Message416136
> the programmer may use the variable __name__ for some other purposes
Dunder names like `__name__` are reserved for the use of the interpreter. If the programmer uses them for "other purposes", the programmer is responsible for any failures.
You wouldn't write:
class MyList(list):
__len__ = "Hello world!"
and then be surprised that MyList is broken. You shouldn't be surprised if setting `__name__` to an invalid value breaks things either. |
|
Date |
User |
Action |
Args |
2022-03-27 21:35:28 | steven.daprano | set | recipients:
+ steven.daprano, Takuo Matsuoka |
2022-03-27 21:35:28 | steven.daprano | set | messageid: <1648416928.83.0.555868136493.issue47136@roundup.psfhosted.org> |
2022-03-27 21:35:28 | steven.daprano | link | issue47136 messages |
2022-03-27 21:35:28 | steven.daprano | create | |
|