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.
This commit is contained in:
Jelle Zijlstra 2021-07-26 09:18:19 -07:00 committed by GitHub
parent c97c2a050c
commit f22737abfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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]]])

View File

@ -0,0 +1 @@
Fix documentation for the return type of :func:`sysconfig.get_path`.