New submission from Peter Inglesby:
It should be an error for a class to define a method twice.
That is, Python should raise an exception when the following code is loaded:
class C:
def m(self):
# do something
def m(self):
# do something
I have just witnessed a beginner get very confused by this!
(Apologies if this is a duplicate of an existing issue.)
----------
messages: 281513
nosy: inglesp
priority: normal
severity: normal
status: open
title: Duplicate method names should be an error
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28776>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com