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

Sample code for the article on f-strings #435

Merged
merged 9 commits into from
Oct 11, 2023
Merged

Conversation

lpozo
Copy link
Contributor

@lpozo lpozo commented Sep 12, 2023

Where to put new files:

  • New files should go into a top-level subfolder, named after the article slug. For example: my-awesome-article

How to merge your changes:

  1. Make sure the CI code style tests all pass (+ run the automatic code formatter if necessary).
  2. Find an RP Team member on Slack and ask them to review & approve your PR.
  3. Once the PR has one positive ("approved") review, GitHub lets you merge the PR.
  4. 🎉

Comment on lines 3 to 5
f"Hello, {name}! You're {age} years old."

f"{2 * 21}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that for providing these code blocks as files it makes sense to wrap REPL session output into calls to print(). That's at least what I've been doing, to make it convenient for readers to run.

Do we have a guideline on doing/not doing that @gahjelle ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess that wrapping the code in calls to print() can confuse the reader because the code differs from the code in the article.

@KateFinegan KateFinegan merged commit b01d29d into master Oct 11, 2023
1 check passed
@KateFinegan KateFinegan deleted the python-f-string branch October 11, 2023 01:26
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.

3 participants