Skip to content
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

Add snippet for Python context manager #1743

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

afallou
Copy link
Contributor

@afallou afallou commented Feb 8, 2025

Why?

Context managers are fairly frequently used in Python; they're also something of a Python-specfic construct.
For example:

with open(filepath) as f:
    file_lines = f.readlines()

What?

Add context manager statement, used with snip with and with wrap.
snip context is a possible alternative name.

Context managers are fairly frequently used in Python; they're also something of a Python-specfic construct.

Add context manager statement, used with `snip with` and `with wrap`.
@knausj85 knausj85 merged commit 6d15eb3 into talonhub:main Feb 9, 2025
2 checks passed
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