singledispatchmethod.register
fails with typing.Self
annotation
#130827
Labels
singledispatchmethod.register
fails with typing.Self
annotation
#130827
Bug report
Bug description:
When using
singledispatchmethod
, theregister
decorator function raises an exception ifself
is annotated withtyping.Self
:Minimal example:
The workaround is to remove the
typing.Self
annotation for the_
function.(Same for
singledispatch
but that should not be used in that case anyway)CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
typing.Self
annotations insingledispatchmethod()
#130829The text was updated successfully, but these errors were encountered: