python / cpython

The Python programming language
https://www.python.org
Other
63.86k stars 30.57k forks source link

Discussion of sys module in Data Model #125495

Open paulehoffman opened 1 month ago

paulehoffman commented 1 month ago

Documentation

In the section titled "I/O objects (also known as file objects)" in the Data Model chapter, it says:

The objects sys.stdin, sys.stdout and sys.stderr are initialized to file objects corresponding to the interpreter’s standard input, output and error streams; they are all open in text mode and therefore follow the interface defined by the io.TextIOBase abstract class.

However, neither the sys nor the io modules have been introduced (and probably should not be in this chapter). Is it appropriate to talk about module-specific features here? Or maybe this text should be modified to lean towards those objects just as examples of file objects?

pppppkun commented 1 month ago

I thought the content about sys.stdin, sys.stdout, and sys.stderr should be placed in Input and Output. I would like to try this one If necessary.