Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 21603c9

Browse files
committed
merge heads
2 parents 4eda937 + 636130e commit 21603c9

8 files changed

Lines changed: 890 additions & 395 deletions

File tree

Doc/library/ipaddress.rst

Lines changed: 443 additions & 74 deletions
Large diffs are not rendered by default.

Doc/library/os.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2248,7 +2248,7 @@ features:
22482248
dirs.remove('CVS') # don't visit CVS directories
22492249

22502250
In the next example, walking the tree bottom-up is essential:
2251-
:func:`unlinkat` doesn't allow deleting a directory before the directory is
2251+
:func:`rmdir` doesn't allow deleting a directory before the directory is
22522252
empty::
22532253

22542254
# Delete everything reachable from the directory named in "top",
@@ -2258,9 +2258,9 @@ features:
22582258
import os
22592259
for root, dirs, files, rootfd in os.fwalk(top, topdown=False):
22602260
for name in files:
2261-
os.unlinkat(rootfd, name)
2261+
os.unlink(name, dir_fd=rootfd)
22622262
for name in dirs:
2263-
os.unlinkat(rootfd, name, os.AT_REMOVEDIR)
2263+
os.rmdir(name, dir_fd=rootfd)
22642264

22652265
Availability: Unix.
22662266

0 commit comments

Comments
 (0)