New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sys
standard streams can be None
#11778
Comments
None
sys
standard streams can be None
There is also another, perhaps more common way for This is how GUI apps usually run on Windows. For code that should work in these GUI apps, you need |
Bug Report
File descriptors could be
None
at Python initialization.print()
function implementation handles the case of stdout beingNone
: https://github.com/python/cpython/blob/6078f2033ea15a16cf52fe8d644a95a3be72d2e3/Python/bltinmodule.c#L2060Exception
implementation handles the case of stderr beingNone
: https://github.com/python/cpython/blob/6078f2033ea15a16cf52fe8d644a95a3be72d2e3/Python/errors.c#L1525To Reproduce (unix)
Expected Behavior
I want the real possible types of the previous
sys.std*
variables.Actual Behavior
https://github.com/python/mypy/blob/df35dcf020b3b03a8e3280edf8ada8c6ad8e0da5/mypy/typeshed/stdlib/sys/__init__.pyi#L71-L80
Your Environment
N/A
The text was updated successfully, but these errors were encountered: