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

Speed uppathlib.Path.glob() by working with strings internally #117586

Closed
Labels
performancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directorytopic-pathlib
@barneygale

Description

@barneygale

pathlib.Path.glob() currently generatesPath objects for intermediate paths that might never be yielded to the user, which is slow and unnecessary. For example, a pattern like**/*.mp3 is evaluated by creating aPath object for every directory visited.

There are already few tricks employed to avoid instantiation, but it would be better if onlyreal results were converted to path objects.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directorytopic-pathlib

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp