Message324082
This is why we have 4 months of betas :-)
On one hand making objects in `typing` module not classes was intentional, but on another hand this use case looks totally fine.
I would say we could update the check in `functools` to accept more things. I am however not sure what to allow here in addition to proper classes, maybe just anything that overrides `__subclasscheck__` and/or `__instancecheck__`? I could imagine there might be some other objects that implement custom instance and class checks beyond `typing` that are rejected by current checks in `functools`.
As a temporary workaround you can use `collections.abc.Sequence`, this type is aliased by `typing.Sequence`, in fact all instance checks etc. are relayed to the former. |
|
Date |
User |
Action |
Args |
2018-08-25 17:30:57 | levkivskyi | set | recipients:
+ levkivskyi, gvanrossum, rhettinger, Dutcho, enedil |
2018-08-25 17:30:57 | levkivskyi | set | messageid: <1535218257.25.0.56676864532.issue34498@psf.upfronthosting.co.za> |
2018-08-25 17:30:57 | levkivskyi | link | issue34498 messages |
2018-08-25 17:30:57 | levkivskyi | create | |
|