[Python-Dev] Should instances really be able to dictate the "existence" of special methods?

Eric Snow ericsnowcurrently at gmail.com
Mon Apr 20 04:41:30 CEST 2015


On Mon, Apr 20, 2015 at 4:37 AM, Guido van Rossum <guido at python.org> wrote:
> OK, so I think there isn't anything we can or should do here. Yes, it's
> possible that type(x).__add__ succeeds but x.__add__ fails. That's how you
> spell descriptor. :-) You could also use a random number generator in
> __getattribube__...

Cool.  That's pretty much what I figured.

-eric


More information about the Python-Dev mailing list