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 <[email protected]> wrote: > > > On Thu, Sep 24, 2020 at 7:02 PM Eric V. Smith <[email protected]> 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 -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/KLMQ7HDYED32XGJAUCDHCVDDJJ2BX63V/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/YSUFVTM7RIZV3JCI7GH6HB5GGQIDZ7AY/ Code of Conduct: http://python.org/psf/codeofconduct/
