You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks to me that memoryview should be generic over the format. That said, I'm uncomfortable making a change like this as long as we don't have type var defaults. (python/typing#307)
@jdufresne Off-topic, but I skimmed the chardet PR you linked. The one nice thing the typeshed stubs for chardet do is distinguish between cases when ResultDict fields can be None or not. Might be worth seeing if there's something worth stealing from there (make sure to check latest typeshed stubs since there were some recent changes)
Activity
srittau commentedon Jun 26, 2022
It looks to me that
memoryviewshould be generic over the format. That said, I'm uncomfortable making a change like this as long as we don't have type var defaults. (python/typing#307)AlexWaygood commentedon Jun 26, 2022
Yeah, this might be quite a big breaking change given that it's a builtin.
hauntsaninja commentedon Jul 8, 2022
@jdufresne Off-topic, but I skimmed the chardet PR you linked. The one nice thing the typeshed stubs for chardet do is distinguish between cases when ResultDict fields can be None or not. Might be worth seeing if there's something worth stealing from there (make sure to check latest typeshed stubs since there were some recent changes)
AlexWaygood commentedon Nov 1, 2023
Marking as deferred unless/until PEP 696 is accepted by the Steering Council and implemented by type checkers.
srittau commentedon Feb 14, 2024
See #11422 for the type var generics feature tracker.
max-muoto commentedon Jul 14, 2024
@srittau This can be closed out now.