in The Python Library Reference there are three places i find lower case "st_mode". all three are in code samples. i find the same for lower case "st_size". where are these attributes of os.stat (and similar) result supposed to be documented? i find these strings in the online documentation, but i use a offline downloaded copy in PDF format that may be missing content. does anyone know where this documentation is in the offline copy? i have PDF version 3.7.4 instead of the online version 3.11.3. but these attributes must exist in 3.7.4 if they showed code samples using them. can someone tell me what is going on here? can anyone tell me what is the proper way to get these values from a stat result (i am getting it yielded from a generator) and which documentation from the PDF ones i would find how this is to be done. note that accessing these attributes works and gets the correct values in the Python version 3.8.10 i am using under Ubuntu 20.04 LTS. this is just a documentation issue.

In the documentation for 3.7.16 (available for download), library.pdf, page 530, the class os.stat_result
I don't know what stopped you from just using find....
Also, all stat attributes are listed in the Index section on page 1909
i did use find (Ctrl+f) on the 3.7.4 version. that's how i found the 3 cases of it in code samples. since was a cases insensitive feature it also matched many upper-case incidents which i skipped as the lower-case attribute was more convenient. using dir() showed me the lower case attribute. right now i don't have the file space to download another doc version (3.7.16) unless it is to replace one i already have. i am currently an LTS behind and am waiting for a new LTS next year. or i might install 22.04 sooner and skip 24.04. whatever Python is on whichever Ubuntu i end up installing is the Python PDF docs version i want to get. but i don't know which that will be, right now. that Ubuntu version will go onto a new layout scheme to get another terabyte of working space, unless i end up with all new hardware with larger storage (this will be my transition to solid state, whenever).
(May-14-2023, 11:58 PM)Skaperen Wrote: [ -> ]whatever Python is on whichever Ubuntu i end up installing is the Python PDF docs version i want to get.
Why don't you install the html documentation locally? It has an efficient search form. Install it with
Output:
sudo apt install python3.10-doc
Browse with
Output:
xdg-open /usr/share/doc/python3.10-doc/html/index.html
Searching
st_mode
gives
os.stat_result.st_mode
as the first hit.
(May-14-2023, 11:58 PM)Skaperen Wrote: [ -> ]i did use find (Ctrl+f) on the 3.7.4 version.
OK, I downloaded 3.7.4 docs from
https://www.python.org/ftp/python/doc/3.7.4/
And using find in library.pdf I found the same - the
class os.stat_result
and all stat attributes on page 558. And they go till page 560
They are also listed in Index at page 1989
i found my search error. generally when i search for an attribute i include a dot (.) in front of the name. but this documentation listed the attribute names without a dot so they did not match the search.