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
This was brought up in python/mypy#1136 (comment) -- Tornado's utf8() function really needs to use @overload but, since they want to use inline annotations, they can't. The type would be something like
@overloaddefutf8(value: None) ->None: ...
@overloaddefutf8(value: bytes) ->bytes: ...
@overloaddefutf8(value: str) ->bytes: ... # or (unicode)->bytes, in PY2
This can't comfortably be expressed using type vars (at least I couldn't figure it out).
The text was updated successfully, but these errors were encountered:
This was brought up in python/mypy#1136 (comment) -- Tornado's utf8() function really needs to use
@overload
but, since they want to use inline annotations, they can't. The type would be something likeThis can't comfortably be expressed using type vars (at least I couldn't figure it out).
The text was updated successfully, but these errors were encountered: