[issue41987] singledispatchmethod raises an error when relying on a forward declaration
Guido van Rossum
report at bugs.python.org
Wed Nov 11 18:50:40 EST 2020
Guido van Rossum <guido at python.org> added the comment:
I spent some time debugging this looking for the root cause.
I think it looks like the recursion check in ForwardRef._evaluate() fails to trigger. At some point recursive_guard is a frozen set containing "'Integer'" (i.e. a string whose first and last character are single quotes, while self.__forward_arg__ is 'Integer' (i.e. a string that does not contain quotes).
I'm running out of time for the rest of the investigation, so feel free to confirm this and go down the rabbit hole from there...
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41987>
_______________________________________
More information about the Python-bugs-list
mailing list