mirror of
https://github.com/python/cpython.git
synced 2025-10-03 21:55:41 +00:00
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 f22737abfa
)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
7482fff297
commit
3f1389459a
2 changed files with 2 additions and 1 deletions
|
@ -138,7 +138,7 @@ identifier. Python currently uses eight paths:
|
||||||
If *expand* is set to ``False``, the path will not be expanded using the
|
If *expand* is set to ``False``, the path will not be expanded using the
|
||||||
variables.
|
variables.
|
||||||
|
|
||||||
If *name* is not found, return ``None``.
|
If *name* is not found, raise a :exc:`KeyError`.
|
||||||
|
|
||||||
|
|
||||||
.. function:: get_paths([scheme, [vars, [expand]]])
|
.. function:: get_paths([scheme, [vars, [expand]]])
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fix documentation for the return type of :func:`sysconfig.get_path`.
|
Loading…
Add table
Add a link
Reference in a new issue