Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-102856: Initial implementation of PEP 701 #102855

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

Merged
merged 12 commits into from
Apr 19, 2023
Prev Previous commit
Fix whitespace to make patchcheck happy
  • Loading branch information
lysnikolaou committed Apr 19, 2023
commit 13f942ac16ef53d2c7add6f299eddcaf9ad0dda5
6 changes: 3 additions & 3 deletions 6 Lib/test/test_fstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,17 +931,17 @@ def test_lambda(self):
# lambda doesn't work without parens, because the colon
# makes the parser think it's a format_spec
# emit warning if we can match a format_spec
self.assertAllRaise(SyntaxError,
self.assertAllRaise(SyntaxError,
"f-string: lambda expressions are not allowed "
"without parentheses",
["f'{lambda x:x}'",
"f'{lambda :x}'",
"f'{lambda *arg, :x}'",
"f'{1, lambda:x}'",
])

# but don't emit the paren warning in general cases
self.assertAllRaise(SyntaxError,
self.assertAllRaise(SyntaxError,
"f-string: expecting a valid expression after '{'",
["f'{lambda x:}'",
"f'{lambda :}'",
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.