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

[python]: learn-lambda-functions-by-building-an-expense-tracker #52580

Closed
ShaunSHamilton opened this issue Dec 18, 2023 · 3 comments · Fixed by #54624
Closed

[python]: learn-lambda-functions-by-building-an-expense-tracker #52580

ShaunSHamilton opened this issue Dec 18, 2023 · 3 comments · Fixed by #54624
Labels
new python course platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: discussing Under discussion threads. Closed as stale after 60 days of inactivity.

Comments

@ShaunSHamilton
Copy link
Member

ShaunSHamilton commented Dec 18, 2023

TO FIX POST BETA RELEASE

@ShaunSHamilton ShaunSHamilton added status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. new python course labels Dec 18, 2023
@freeCodeCamp freeCodeCamp locked and limited conversation to collaborators Dec 18, 2023
@Dario-DC
Copy link
Contributor

See also #52722

@ilenia-magoni
Copy link
Contributor

ilenia-magoni commented Feb 12, 2024

Since the adding of quotes around strings, step 9 is a good place to repeat that if your string is surrounded with a kind of quote, then you need to escape or use a different kind of quote as this step require f'Amount: {expense["amount"]}, Category: {expense["category"]}'

also, with the great number of same-name variables, it could be also a place to talk about scope

@gikf
Copy link
Member

gikf commented Feb 13, 2024

Since the adding of quotes around strings, step 9 is a good place to repeat that if your string is surrounded with a kind of quote, then you need to escape or use a different kind of quote as this step require f'Amount: {expense["amount"]}, Category: {expense["category"]}'

F-string is a bit special case here, which additionally changed very recently in Python 3.12

For f-strings:

  • Python pre-3.12
    • Using backslash \ is not allowed in any part inside of the {}.
    • Using the same quotes inside of the {} is not allowed.
  • Python 3.12+:
    • Using backslash \ is allowed inside of the {}.
    • Using the same quote inside of the {} is allowed, even without escaping, but not encouraged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new python course platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: discussing Under discussion threads. Closed as stale after 60 days of inactivity.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants