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

Commit69dabd2

Browse files
committed
Tiny tweaks
1 parent085e105 commit69dabd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎Lib/posixpath.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def realpath(filename, *, strict=False):
423423
pardir='..'
424424
getcwd=os.getcwd
425425

426-
path=sepiffilename.startswith(sep)elsegetcwd()
426+
path=sepiffilename[:1]==sepelsegetcwd()
427427
rest=filename.split(sep)[::-1]
428428
seen= {}
429429
querying=True
@@ -463,7 +463,7 @@ def realpath(filename, *, strict=False):
463463
# Return already resolved part + rest of the path unchanged.
464464
path=newpath
465465
querying=False
466-
continue
466+
continue
467467
try:
468468
st=os.lstat(newpath)
469469
ifnotstat.S_ISLNK(st.st_mode):
@@ -479,7 +479,7 @@ def realpath(filename, *, strict=False):
479479
continue
480480

481481
seen[newpath]=None# not resolved symlink
482-
iftarget.startswith(sep):
482+
iftarget[:1]==sep:
483483
path=sep
484484
rest.append(newpath)
485485
rest.append(None)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp