I think it can be easily solved much like a normal bug fix - upon instance
creation and before throwing an "ABC doesn't implement..." error, recheck
the class __dict__ or even mro using hasattr, and only then throw the
exception.

It will slow down only the specific course where the methods were defined
dynamically. Plus it'll support dynamic __getattr__ on a child metaclass as
an added bonus.

Bar Harel.

On Thu, Sep 24, 2020, 7:28 PM Ben Avrahami <avrahami....@gmail.com> wrote:

>
>
> On Thu, Sep 24, 2020 at 7:02 PM Eric V. Smith <e...@trueblade.com> wrote:
>
>> Does anyone know if attrs handles this? I don't have a recent version
>> installed, but I'll take a look later today.
>>
>
> attrs handles this only if you set slots=True (which makes sense since
> attrs would have to rebuild the class)
> _______________________________________________
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-le...@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/KLMQ7HDYED32XGJAUCDHCVDDJJ2BX63V/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/YSUFVTM7RIZV3JCI7GH6HB5GGQIDZ7AY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to