Skip to content
New issue

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

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

Already on GitHub? # to your account

Sample code for the article on namespace #659

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

lpozo
Copy link
Contributor

@lpozo lpozo commented Mar 26, 2025

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
# print(message)
# globals()["message"] = "Hello, World!"
# print(message)
Copy link
Contributor

Choose a reason for hiding this comment

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

@lpozo I assume you commented these out to satisfy the linter checks? In the future, you can use the special # noqa comment to suppress the linter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently this doesn't work:

image

Copy link
Contributor

@bzaczynski bzaczynski left a comment

Choose a reason for hiding this comment

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

@lpozo Approved with some comments 😉



def outer():
# x = "enclosing"
Copy link
Contributor

Choose a reason for hiding this comment

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

@lpozo Same reason for the comment as before?

Comment on lines 12 to 17
# print(loc)
# number = 42
# print(f"{loc=}")
# loc["message"] = "Welcome!"
# print(f"{loc=}")
# print(locals())
Copy link
Contributor

Choose a reason for hiding this comment

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

@lpozo These print calls could also use f-strings to keep them consistent with the updated tutorial.



# f()
# fruits
Copy link
Contributor

Choose a reason for hiding this comment

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

@lpozo This should probably be wrapped in a call to print().

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

Successfully merging this pull request may close these issues.

2 participants