Skip to content

Commit 3f13894

Browse files
The current documentation says it returns None if the name is not found, but (GH-26785) (GH-27372)
the implementation uses [] and will raise KeyError instead. Noticed by @srittau in python/typeshed@5659. (cherry picked from commit f22737a) Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent 7482fff commit 3f13894

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Doc/library/sysconfig.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ identifier. Python currently uses eight paths:
138138
If *expand* is set to ``False``, the path will not be expanded using the
139139
variables.
140140

141-
If *name* is not found, return ``None``.
141+
If *name* is not found, raise a :exc:`KeyError`.
142142

143143

144144
.. function:: get_paths([scheme, [vars, [expand]]])
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix documentation for the return type of :func:`sysconfig.get_path`.

0 commit comments

Comments
 (0)