Previously discussed here [1] [2], it was raised that the input function could
take file objects to display prompts in places other than sys.stdout and
receive input from places other than sys.stdin. Locally, the patch I have
produces the following help text:
```
Help on built-in function input in module builtins:
input(prompt=None, /, infile=None, outfile=None)
Read a string from a stream, or from standard input by default. The
trailing newline is stripped.
The output file is standard output by default.
The prompt string, if given, is printed to the output file without a
trailing newline before reading input.
If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.
On *nix systems, readline is used if available.
```
The idea of an errfile parameter was also raised.
What do people think about this?
[1]: https://mail.python.org/pipermail/python-ideas/2017-September/047230.html
[2]:
https://mail.python.org/pipermail/python-ideas/2017-September/thread.html#47230
Kind regards,
Sam Ezeh
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/RZTJCL7R3TIQGOJGHN4THKAESARSDDT5/
Code of Conduct: http://python.org/psf/codeofconduct/