Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Feature or enhancement
Proposal:
memoryview was made generic in typeshed inpython/typeshed#12247. Mypy recently received a report (python/mypy#18053) due to it not being subscriptable at runtime:
>>>memoryview[int]Traceback (mostrecentcalllast):File"<python-input-0>",line1,in<module>memoryview[int]~~~~~~~~~~^^^^^TypeError: type'memoryview'isnotsubscriptable
It seems thatmemoryview should be made subscriptable at runtime, like other standard library classes that are generic in typeshed.
Happy to make a PR if there's agreement that this should be added.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response