This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author inglesp
Recipients inglesp
Date 2016-11-22.20:49:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479847786.59.0.434760924279.issue28776@psf.upfronthosting.co.za>
In-reply-to
Content
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.)
History
Date User Action Args
2016-11-22 20:49:46inglespsetrecipients: + inglesp
2016-11-22 20:49:46inglespsetmessageid: <1479847786.59.0.434760924279.issue28776@psf.upfronthosting.co.za>
2016-11-22 20:49:46inglesplinkissue28776 messages
2016-11-22 20:49:46inglespcreate