On 20Nov2022 12:36, Chris Angelico <ros...@gmail.com> wrote:
On Sun, 20 Nov 2022 at 12:27, Cameron Simpson <c...@cskk.id.au> wrote:
But really, is there any problem which cannot be solved with a
decorator? I've even got a @decorator decorator for my decorators.
Do you have a @toomanydecorators decorator to reduce the number of
decorators you need to decorate your decorators?
Apparently not :-)
@classmethod
@pfx_method
@promote
@typechecked
def promote(cls, policy, epoch: Optional[Epoch] = None, **policy_kw):
and there aren't even any @require decorators on that one (from the
excellent icontract package).
Cheers,
Cameron Simpson <c...@cskk.id.au>
--
https://mail.python.org/mailman/listinfo/python-list