Skip to content

Commit 1718808

Browse files
committed
bpo-46826: add documentation for prefixes argument on site.getsitepackages
1 parent 1e34468 commit 1718808

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

Doc/library/site.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,19 @@ Module contents
211211
used in :mod:`sitecustomize` or :mod:`usercustomize` (see above).
212212

213213

214-
.. function:: getsitepackages()
214+
.. function:: getsitepackages(prefixes=None)
215215

216-
Return a list containing all global site-packages directories.
216+
Return a list containing all global :file:`site-packages` directories.
217+
218+
For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes*
219+
is None), this function will find its :file:`site-packages` subdirectory
220+
depending on the system environment, and will return a list of full paths.
217221

218222
.. versionadded:: 3.2
219223

224+
.. versionchanged:: 3.3
225+
Add the optional *prefixes* argument.
226+
220227

221228
.. function:: getuserbase()
222229

0 commit comments

Comments
 (0)