mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-36264: Updates documentation for change to expanduser on Windows (GH-12294)
This commit is contained in:
parent
f45813df52
commit
8ef864d50f
2 changed files with 15 additions and 4 deletions
|
|
@ -172,10 +172,10 @@ the :mod:`glob` module.)
|
|||
password directory through the built-in module :mod:`pwd`. An initial ``~user``
|
||||
is looked up directly in the password directory.
|
||||
|
||||
On Windows, :envvar:`HOME` and :envvar:`USERPROFILE` will be used if set,
|
||||
otherwise a combination of :envvar:`HOMEPATH` and :envvar:`HOMEDRIVE` will be
|
||||
used. An initial ``~user`` is handled by stripping the last directory component
|
||||
from the created user path derived above.
|
||||
On Windows, :envvar:`USERPROFILE` will be used if set, otherwise a combination
|
||||
of :envvar:`HOMEPATH` and :envvar:`HOMEDRIVE` will be used. An initial
|
||||
``~user`` is handled by stripping the last directory component from the created
|
||||
user path derived above.
|
||||
|
||||
If the expansion fails or if the path does not begin with a tilde, the path is
|
||||
returned unchanged.
|
||||
|
|
@ -183,6 +183,9 @@ the :mod:`glob` module.)
|
|||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object`.
|
||||
|
||||
.. versionchanged:: 3.8
|
||||
No longer uses :envvar:`HOME` on Windows.
|
||||
|
||||
.. index::
|
||||
single: $ (dollar); environment variables expansion
|
||||
single: % (percent); environment variables expansion (Windows)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue