diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2021-07-26 16:18:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-26 16:18:19 (GMT) |
commit | f22737abfa07605f4ed1a99cfa97a26520b6c5c2 (patch) | |
tree | d8d0c12f220e85831d1bf9334f76d1531692b312 /Doc/library | |
parent | c97c2a050cf753003012ae3f08e035326b8f6167 (diff) | |
download | cpython-f22737abfa07605f4ed1a99cfa97a26520b6c5c2.zip cpython-f22737abfa07605f4ed1a99cfa97a26520b6c5c2.tar.gz cpython-f22737abfa07605f4ed1a99cfa97a26520b6c5c2.tar.bz2 |
The current documentation says it returns None if the name is not found, but (GH-26785)
the implementation uses [] and will raise KeyError instead.
Noticed by @srittau in python/typeshed@5659.
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]]]) |