Skip to content

Commit

Permalink
The current documentation says it returns None if the name is not fou…
Browse files Browse the repository at this point in the history
…nd, 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 <jelle.zijlstra@gmail.com>
  • Loading branch information
miss-islington and JelleZijlstra committed Jul 26, 2021
1 parent 7482fff commit 3f13894
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/library/sysconfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,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]]])
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix documentation for the return type of :func:`sysconfig.get_path`.

0 comments on commit 3f13894

Please sign in to comment.