FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

`pathlib.PurePath.match()` can incorrectly match empty path · Issue #106330 · python/cpython · GitHub

/ cpython Public

pathlib.PurePath.match() can incorrectly match empty path #106330

Description

>>> from pathlib import PurePath
>>> PurePath().match('*')
True

This should be false, because a * segment always consumes exactly one path component, but empty paths have 0 components.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixestopic-pathlibtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL