[issue34498] Python 3.7 breaks on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

Łukasz Langa report at bugs.python.org
Tue Aug 28 08:58:02 EDT 2018


Łukasz Langa <lukasz at langa.pl> added the comment:

> I would say we could update the check in `functools` to accept more things.

Could we revert abstract types in `typing` to respond True to `isinstance(..., type)` again?  I don't want singledispatch, or any other library like it, to have to special-case typing.   Especially for *non-generic* variants, responding True to `isinstance()` seems reasonable to me.  We cannot dispatch by `Sequence[int]` and some such so it makes sense for *those* to keep failing going forward.

The current suggested workaround of using abc.Sequence instead will work.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34498>
_______________________________________


More information about the Python-bugs-list mailing list