Skip to content

gh-108095: Add re.grep module #108096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Aug 17, 2023

@serhiy-storchaka
Copy link
Member Author

No docs and tests yet.

return [line.removesuffix('\n') for line in f.readlines()]

def main():
parser = argparse.ArgumentParser(add_help=False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot of code for one function. I would put the parser code in a separate function, say 'grep_parser' and replace opts = parser.parse_args() below with opts = grep_parser()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something went wrong in the quoting. I only wanted the last line included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants