Python Forum

Full Version: doc for os.stat() lacks exceptions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
while reading documentation for os.stat() and os.lstat() i don't see what exceptions it might raise or what errors could cause a return of None or something other than a stat_result object. the documentation just says they return a stat_result object. it can't if the file does not exist, so the documentation is clearly incomplete. where can i find documentation of all possible results of these functions?
you can find a list of os exceptions here: https://docs.python.org/3.9/library/exce...ml#OSError