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

Improve performance ofpathlib.Path.[is_]absolute() #103548

Closed
Labels
3.12only security fixesperformancePerformance or resource usagetopic-pathlibtype-featureA feature request or enhancement
@barneygale

Description

@barneygale

Two optimizations are possible:

  • is_absolute() can pass theunnormalized path toos.path.isabs()
  • absolute() on an empty path (orPath.cwd()) can avoid joining an empty string onto the working directory (thus avoiding a call toos.path.join()), and short-circuit the string normalization (as the result ofgetcwd() is fully normalized)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixesperformancePerformance or resource usagetopic-pathlibtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp