diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-07-26 19:35:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-26 19:35:33 (GMT) |
commit | 5151826ee453eb6b8d32336e289573c421e956a4 (patch) | |
tree | 75e657a901d2401b76422b251e5f8986bc3a54ee /Doc/library | |
parent | 563e05743c8f31366db7ef35a00e396c9f442b17 (diff) | |
download | cpython-5151826ee453eb6b8d32336e289573c421e956a4.zip cpython-5151826ee453eb6b8d32336e289573c421e956a4.tar.gz cpython-5151826ee453eb6b8d32336e289573c421e956a4.tar.bz2 |
The current documentation says it returns None if the name is not found, but (GH-26785) (GH-27371)
the implementation uses [] and will raise KeyError instead.
Noticed by @srittau in python/typeshed@5659.
(cherry picked from commit f22737abfa07605f4ed1a99cfa97a26520b6c5c2)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/sysconfig.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/sysconfig.rst b/Doc/library/sysconfig.rst index bb8e2d8..2de55d8 100644 --- a/Doc/library/sysconfig.rst +++ b/Doc/library/sysconfig.rst @@ -175,7 +175,7 @@ identifier. Python currently uses eight paths: If *expand* is set to ``False``, the path will not be expanded using the variables. - If *name* is not found, return ``None``. + If *name* is not found, raise a :exc:`KeyError`. .. function:: get_paths([scheme, [vars, [expand]]]) |