Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-112727: Speed uppathlib.Path.absolute()#112728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
barneygale merged 4 commits intopython:mainfrombarneygale:speed-up-path-absolute
Dec 4, 2023
Merged
Changes from1 commit
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
PrevPrevious commit
Update Lib/pathlib.py
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
@barneygale@AlexWaygood
barneygale andAlexWaygood authoredDec 4, 2023
commit2ad781ef928b519964048760e0215f6c4e658ac9
4 changes: 2 additions & 2 deletionsLib/pathlib.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1415,10 +1415,10 @@ def absolute(self):
"""
if self.is_absolute():
return self
elif self.root:
if self.root:
drive = os.path.splitroot(os.getcwd())[0]
return self._from_parsed_parts(drive, self.root, self._tail)
elif self.drive:
if self.drive:
# There is a CWD on each drive-letter drive.
cwd = os.path.abspath(self.drive)
else:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp