Fwd: The doc demo have some problems
The appended email crossed the transom at webmaster@python.org today.
Apologies for the hot mess Gmail makes of forwarded emails.
I wonder if it makes sense to warn about misspelled dunder names. I tried
pylinting (1.1.0, sorry, it's what I have here at work) and flake8ing (2.0)
this:
class Foo(object):
def __init_(self):
self.x = 0
def _add_(self, other):
return self.x + other.x
Pylint complained about attribute x not being defined in __init__, but
that's a rather indirect message. It failed to say anything about _add_.
Flake8 said nothing.
Is this a common enough problem that these sort of tools should warn about
mistakes in the leading/trailing underscore count of otherwise dunder
attributes?
Skip
---------- Forwarded message ----------
From: protestmailself
participants (1)
-
Skip Montanaro