Author gvanrossum
Recipients abarnert, gvanrossum, martin.panter, ncoghlan, rhettinger, serhiy.storchaka
Date 2016-02-02.03:18:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAP7+vJJE=+rg5jT72z_LMct-fX4WW3ginSUoL2JR93L8ip9Okw@mail.gmail.com>
In-reply-to <1454379957.15.0.525217998962.issue25958@psf.upfronthosting.co.za>
Content
> This is not really my area of expertise, but I would have thought if you defined a __special__ method to something illegal (non-callable, or wrong signature) it would be reasonable for Python to raise an error at class definition (or assignment) time, not just later when you try to use it.

No, that's not the intention.

> Somewhere I think the documentation says you are only allowed to use these names as documented.

Indeed, but it's not enforced. What it means is that when the next
release of Python (or a different implementation) changes the meaning
of a __special__ name, you can't complain that your code broke.

(And please don't go suggesting that we start enforcing it.)
History
Date User Action Args
2016-02-02 03:18:12gvanrossumsetrecipients: + gvanrossum, rhettinger, ncoghlan, martin.panter, serhiy.storchaka, abarnert
2016-02-02 03:18:12gvanrossumlinkissue25958 messages
2016-02-02 03:18:12gvanrossumcreate