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-73991: Split "Directory and file operations" section in shutil docs#119159

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

Closed

Conversation

@barneygale
Copy link
Contributor

@barneygalebarneygale commentedMay 18, 2024
edited by github-actionsbot
Loading

Split "Directory and file operations" section in five:

  1. "Copying files"
  2. "Recursively copying, moving and removing"
  3. "Querying disk usage"
  4. "Changing file ownership"
  5. "Finding executables"

The "Platform-dependent efficient copy operations" information is moved to "Copying files". The examples ofcopytree() andrmtree() are moved into their function docs.

This should be slightly easier to navigate for users, and draws more of a distinction between the lower-level file copying functions and the higher-levelcopytree() /rmtree() /move() functions.


📚 Documentation preview 📚:https://cpython-previews--119159.org.readthedocs.build/

…il docsSplit "Directory and file operations" section in five:1. "Copying files"2. "Recursively copying, moving and removing"3. "Querying disk usage"4. "Changing file ownership"5. "Finding executables"The "Platform-dependent efficient copy operations" information is moved to"Copying files". The examples of `copytree()` and `rmtree()` are moved intotheir function docs.This should be slightly easier to navigate for users, and draws more of adistinction between the lower-level file copying functions and thehigher-level `copytree()` / `rmtree()` / `move()` functions.
return [] # nothing will be ignored

copytree(source, destination, ignore=_logpath)

Copy link
Member

Choose a reason for hiding this comment

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

Taken in isolation, this example seems weird, as it's not actually ignoring anything. I'd suggest keeping theignore_patterns example from the original text as well, and describe this example as something like:

You don't have to ignore anything, if you simply want to run some code for every directory that gets processed. For example, this snippet uses theignore argument to add a logging call::

Copy link
Member

@pfmoorepfmoore left a comment

Choose a reason for hiding this comment

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

Apart from the one comment I made (I accidentally clicked "add a single comment" rather than "Start a review" 🙁) this LGTM

@barneygale
Copy link
ContributorAuthor

Withdrawing this PR. With the work onGH-73991 at its end, we actually didn't need to touchshutil.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@pfmoorepfmoorepfmoore left review comments

Assignees

No one assigned

Labels

awaiting core reviewdocsDocumentation in the Doc dirskip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@barneygale@pfmoore

[8]ページ先頭

©2009-2025 Movatter.jp