[Python-ideas] "Sum" Type hinting [was: Type hinting for path-related functions]
Koos Zevenhoven
k7hoven at gmail.com
Mon May 16 10:53:25 EDT 2016
On Sun, May 15, 2016 at 8:20 PM, Stephen J. Turnbull <stephen at xemacs.org> wrote:
>
> But I shouldn't have taken the OP's Union[bytes,str] seriously. In
> fact the os.path functions and other such functions are defined with
> AnyStr, which is a *variable* type, not a Union type. In typeshed, we
> write
If you mean my OP in the other thread, I was indeed just introducing
the readers (potentially not familiar with PEP 484, mypy etc.) to the
basic concepts such as Unions and TypeVars while going towards the
actual proposal at the very end of the post, which was to avoid having
to go from TypeVars "back to" Unions in os.fspath and os.path
functions.
-- Koos
More information about the Python-ideas
mailing list