Skip to content

Commit 50c4698

Browse files
miss-islingtonasnellingclaudeserhiy-storchaka
authored
[3.15] gh-90982: Document prefixes argument on site.getsitepackages (GH-31546) (#155643)
Co-authored-by: Addison Snelling <addison@asnell.io> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 94aa79c commit 50c4698

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Doc/library/site.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,12 +449,19 @@ Module contents
449449
Also processes :file:`.start` files. See :ref:`site-start-files`.
450450

451451

452-
.. function:: getsitepackages()
452+
.. function:: getsitepackages(prefixes=None)
453453

454454
Return a list containing all global site-packages directories.
455455

456+
For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes*
457+
is ``None``), this function will find its site-packages subdirectory
458+
depending on the system environment, and will return a list of full paths.
459+
456460
.. versionadded:: 3.2
457461

462+
.. versionchanged:: 3.3
463+
Added the optional *prefixes* parameter.
464+
458465

459466
.. function:: getuserbase()
460467

0 commit comments

Comments
 (0)