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
And while this approach makes me very sad, it is good that such cases are marked with MaybeNone, for the purpose of looking at them specially. Maybe some type checker will arise that will have specific handling for it and do something smarter instead.
With that in mind, it would be good to ensure that all such cases are consistently marked.
I noticed at least one case that is not marked like this. It has | Any directly written instead of | MaybeNone. This is in re.match.group*:
Sure, if AnyOf is ever approved, then in this repository one could find all occurrences of MaybeNone and replace them.
But that's what I want to track in this issue - that all the occurrences are readily marked for this. So that then it's more straightforward to apply any such ideas.
I noticed that there's a special type alias
MaybeNone
that represents this specific intent:You can find an example in a relatively recent addition of this.
And while this approach makes me very sad, it is good that such cases are marked with
MaybeNone
, for the purpose of looking at them specially. Maybe some type checker will arise that will have specific handling for it and do something smarter instead.With that in mind, it would be good to ensure that all such cases are consistently marked.
I noticed at least one case that is not marked like this. It has
| Any
directly written instead of| MaybeNone
. This is inre.match.group*
:typeshed/stdlib/re.pyi
Lines 93 to 117 in 6feca18
The text was updated successfully, but these errors were encountered: