Chris Green <c...@isbd.net> writes: > Stefan Ram <r...@zedat.fu-berlin.de> wrote: >> Chris Green <c...@isbd.net> writes: I can't find the documentation for >> >read(). It's not a built-in function and it's not documented with >> >(for example) the file type object sys.stdin. >> >> |read() (asyncio.StreamReader method), 894 >> |read() (chunk.Chunk method), 1385 >> |read() (codecs.StreamReader method), 164 >> |read() (configparser.ConfigParser method), 537 >> |read() (http.client.HTTPResponse method), 1276 >> |read() (imaplib.IMAP4 method), 1291 >> |read() (in module os), 578 >> |read() (io.BufferedIOBase method), 622 >> |read() (io.BufferedReader method), 625 >> |read() (io.RawIOBase method), 621 >> |read() (io.TextIOBase method), 626 >> |read() (mimetypes.MimeTypes method), 1146 >> |read() (mmap.mmap method), 1053 >> |read() (ossaudiodev.oss_audio_device method), 1388 >> |read() (ssl.MemoryBIO method), 1024 >> |read() (ssl.SSLSocket method), 1005 >> |read() (urllib.robotparser.RobotFileParser method), 1268 >> |read() (zipfile.ZipFile method), 499 >> Index of "The Python Library Reference, Release 3.9.0a3" >> >> > But none of those is the documentation for read(), they're just places > that refer to read().
There is no single read() method, so there can be no single place to find its documentation. To take one of Stefan's examples, https://docs.python.org/3/library/io.html?highlight=io%20bufferedreader#io.BufferedReader.read says read([size]) Read and return size bytes, or if size is not given or negative, until EOF or if the read call would block in non-blocking mode. That's the documentation. -- https://mail.python.org/mailman/listinfo/python-list