-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Conversation
python-f-string/basic_f_strings.py
Outdated
f"Hello, {name}! You're {age} years old." | ||
|
||
f"{2 * 21}" |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
Where to put new files:
my-awesome-article
How to merge your changes: