Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Doc/library/site.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,19 @@ Module contents
used in :mod:`sitecustomize` or :mod:`usercustomize` (see above).


.. function:: getsitepackages()
.. function:: getsitepackages(prefixes=None)

Return a list containing all global site-packages directories.
Return a list containing all global :file:`site-packages` directories.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Return a list containing all global :file:`site-packages` directories.
Return a list containing all global site-packages directories.

This should be reverted, it does not do what you think it does.


For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes*
is None), this function will find its :file:`site-packages` subdirectory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
is None), this function will find its :file:`site-packages` subdirectory
is ``None``), this function will find its :file:`site-packages` subdirectory

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
is None), this function will find its :file:`site-packages` subdirectory
is None), this function will find its site-packages subdirectory

depending on the system environment, and will return a list of full paths.

.. versionadded:: 3.2

.. versionchanged:: 3.3
Add the optional *prefixes* argument.


.. function:: getuserbase()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document prefixes argument on site.getsitepackages
Copy link
Contributor

@slateny slateny Oct 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it's a doc change I'd say you can remove this file

Actually, since it documents a new parameter it might be useful to have the news.

Suggested change
document prefixes argument on site.getsitepackages
Document prefixes argument for :func:`~site.getsitepackages`.

Loading