python / python/cpython

Consolidate `pathlib.PurePath.match()` and `full_match()`

Open
#139,282 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stdlib topic-pathlib
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Whichever fool (me!) added pathlib.PurePath.full_match() should have given more consideration to adding an argument to match() instead of a new method. The behaviour isn't that different. The fact we have two very similar methods is a bit of a wart. It's hopefully not too late to rectify.

Linked PRs
  • gh-139311

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the pathlib.PurePath.match() and full_match() APIs described in the issue, then inspect linked PR gh-139311 to see where the work has moved. Done means reaching an agreed consolidation of the two similar methods without leaving the current API inconsistency unresolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.