micropython / micropython/micropython-lib

Back references in re.py

Open
#220 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
1.1k
Avg merge
7d 6h
Merged PRs (30d)
3

Description

Hello. I wrote something to make back references(\0-\9) work with re.sub. Not the prettiest but it does seem to work. Unfortunately, I did not understand how to commit this properly. So I'm leaving it here for now. Sorry for the inconvenience.

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

Start by reviewing re.py and the existing re.sub implementation to understand how replacement strings are parsed. Check the issue's proposed back-reference behavior for \0-\9, then identify the relevant existing test coverage. Done means re.sub supports the requested back references without breaking current replacement behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.