[issue28776] Duplicate method names should be an error

STINNER Victor report at bugs.python.org
Tue Nov 22 15:51:45 EST 2016


STINNER Victor added the comment:

Redefine a method is a common practice indirectly using decorators:

  @staticmethod
  def method(): pass

is like:

  def method(): pass
  method = staticmethod(method)

So you can clarify what do you mean by "redefining"?

Some linters already can such common mistake (very common mistake in unit tests when using copy & paste).

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28776>
_______________________________________


More information about the Python-bugs-list mailing list