diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 19:27:16 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 19:27:16 (GMT) |
commit | a19195984922ce89e7695c93b3bb45c3e0e6d732 (patch) | |
tree | 2cbafae7aa7aa368583be6216a0c23bce0774a0f /Doc/library/os.rst | |
parent | f61dc4cea24c2e994dc11947a6d67708af87ce50 (diff) | |
parent | 5b89840d9cf11014a4b865d79497649f74bf2866 (diff) | |
download | cpython-a19195984922ce89e7695c93b3bb45c3e0e6d732.zip cpython-a19195984922ce89e7695c93b3bb45c3e0e6d732.tar.gz cpython-a19195984922ce89e7695c93b3bb45c3e0e6d732.tar.bz2 |
Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r-- | Doc/library/os.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index a82b401..d2f7d01 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1171,7 +1171,7 @@ Querying the size of a terminal output) specifies which file descriptor should be queried. If the file descriptor is not connected to a terminal, an :exc:`OSError` - is thrown. + is raised. :func:`shutil.get_terminal_size` is the high-level function which should normally be used, ``os.get_terminal_size`` is the low-level @@ -1945,7 +1945,7 @@ features: :mod:`os` module permit use of their *dir_fd* parameter. Different platforms provide different functionality, and an option that might work on one might be unsupported on another. For consistency's sakes, functions that support - *dir_fd* always allow specifying the parameter, but will throw an exception + *dir_fd* always allow specifying the parameter, but will raise an exception if the functionality is not actually available. To check whether a particular function permits use of its *dir_fd* @@ -1986,7 +1986,7 @@ features: descriptor. Different platforms provide different functionality, and an option that might work on one might be unsupported on another. For consistency's sakes, functions that support *fd* always allow specifying - the parameter, but will throw an exception if the functionality is not + the parameter, but will raise an exception if the functionality is not actually available. To check whether a particular function permits specifying an open file @@ -2007,7 +2007,7 @@ features: platforms provide different functionality, and an option that might work on one might be unsupported on another. For consistency's sakes, functions that support *follow_symlinks* always allow specifying the parameter, but will - throw an exception if the functionality is not actually available. + raise an exception if the functionality is not actually available. To check whether a particular function permits use of its *follow_symlinks* parameter, use the ``in`` operator on ``supports_follow_symlinks``. As an |