Skip to content

Commit 678c8ca

Browse files
asnellingmiss-islington
authored andcommitted
gh-90982: Document prefixes argument on site.getsitepackages (GH-31546)
(cherry picked from commit bc31217) Co-authored-by: Addison Snelling <addison@asnell.io>
1 parent fdf830d commit 678c8ca

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
@@ -233,12 +233,19 @@ Module contents
233233
used in :mod:`sitecustomize` or :mod:`usercustomize` (see above).
234234

235235

236-
.. function:: getsitepackages()
236+
.. function:: getsitepackages(prefixes=None)
237237

238238
Return a list containing all global site-packages directories.
239239

240+
For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes*
241+
is ``None``), this function will find its site-packages subdirectory
242+
depending on the system environment, and will return a list of full paths.
243+
240244
.. versionadded:: 3.2
241245

246+
.. versionchanged:: 3.3
247+
Add the optional *prefixes* argument.
248+
242249

243250
.. function:: getuserbase()
244251

0 commit comments

Comments
 (0)