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 avrahami.ben
Recipients avrahami.ben, bar.harel, eric.smith, gvanrossum, python-dev, rhettinger
Date 2020-10-04.18:22:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Adding a function to recalculate will require everyone to use it

I'd argue that this is akin to `functools.update_wrapper`. It too is a function that must be called in virtually every function decorator (the only function decorators that don't/needn't call it are the built-in method decorators and, appropriately enough, @abstractmethod), and if not called, certain functionality won't work.

> and worse, know that it even exists

I think that knowing about such a function is a fair requirement. Mixin tools already has nuances and edge cases, such that it should only be done (and especially distributed) by advanced users.

Furthermore, not all class mixin tools have/need to be ABC-aware. Just as `total_ordering` is ABC-agnostic (indeed, it is also subclass-agnostic), any other mixin tool can decide that implementing abstract classes is simply not a use case for them. The upshot of the `update_abstractmethods` implementation is that, as long as their implementation isn't afraid to override methods that are already defined (like attrs does), the function can be slotted above ABC-agnostic wrappers and it suddenly becomes ABC-aware.
Date User Action Args
2020-10-04 18:22:04avrahami.bensetrecipients: + avrahami.ben, gvanrossum, rhettinger, eric.smith, python-dev, bar.harel
2020-10-04 18:22:03avrahami.bensetmessageid: <>
2020-10-04 18:22:03avrahami.benlinkissue41905 messages
2020-10-04 18:22:03avrahami.bencreate