You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__*__
System-defined names, informally known as “dunder” names. These names are defined by the interpreter and its implementation (including the standard library). Current system names are discussed in the Special method names section and elsewhere. More will likely be defined in future versions of Python. Any use of __*__ names, in any context, that does not follow explicitly documented use, is subject to breakage without warning.
So we should warn users against ever creating a method with that naming convention!
Desired solution
New lint checker that checks for any method definition with a __dunder__ style name that is not an official python __dunder__ method.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Current problem
I'm currently working on a PR (#5938) that warns users against manually invoking magic methods.
This led me to wonder what happens if a user defines their own method using the
__dunder__
naming convention.e.g.
According to the docs
So we should warn users against ever creating a method with that naming convention!
Desired solution
New lint checker that checks for any method definition with a
__dunder__
style name that is not an official python__dunder__
method.Additional context
No response
The text was updated successfully, but these errors were encountered: