This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thehesiod
Recipients thehesiod
Date 2019-02-16.08:04:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550304256.68.0.492420733825.issue36009@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-02-16 08:04:16thehesiodsetrecipients: + thehesiod
2019-02-16 08:04:16thehesiodsetmessageid: <1550304256.68.0.492420733825.issue36009@roundup.psfhosted.org>
2019-02-16 08:04:16thehesiodlinkissue36009 messages
2019-02-16 08:04:16thehesiodcreate