Message335674
For valid types which encapsulate other types, like typing.List or typing.Tuple, you can declare what's contained in them like so:
foo: typing.List[int] = []
Unfortunately weakref.ReferenceType does not allow you to do this. You get the error:
>>> foo: weakref.ReferenceType[typing.Any] = None
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'type' object is not subscriptable
so either ReferenceType should be fixed or a new type made available. |
|
Date |
User |
Action |
Args |
2019-02-16 08:04:16 | thehesiod | set | recipients:
+ thehesiod |
2019-02-16 08:04:16 | thehesiod | set | messageid: <1550304256.68.0.492420733825.issue36009@roundup.psfhosted.org> |
2019-02-16 08:04:16 | thehesiod | link | issue36009 messages |
2019-02-16 08:04:16 | thehesiod | create | |
|