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-121804: always show error location for SyntaxError's in new repl #121886

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 7 commits into from
Aug 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
amend news
  • Loading branch information
skirpichev committed Jul 17, 2024
commit 25dfe269c3a3d2bd85e707995c929c68fec34dcf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Add new kwarg ``source`` for
Copy link
Member

Choose a reason for hiding this comment

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

We don't want to make this argument public so let's not mention it in the change log . Instead, mention what we are fixing in the repl

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe I should make it underscore-prefixed?

Copy link
Member

Choose a reason for hiding this comment

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

Our experience is that if it appears in the signature, people will use it and then changing it will be more challenging. Also some times the underscore prefixed argument is used to avoid collision with keywords or other reserved identifiers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Our experience is that if it appears in the signature, people will use it and then changing it will be more challenging.

Yeah, I did a proposal to hide this per default: https://discuss.python.org/t/25543.

Also some times the underscore prefixed argument is used to avoid collision with keywords

I was thinking that it's pep8 violation. "it is generally better to append a single trailing underscore rather than use an abbreviation or spelling corruption." (c)

:meth:`InteractiveInterpreter.showsyntaxerror()` to support enhanced error
:meth:`code.InteractiveInterpreter.showsyntaxerror()` to support enhanced error
messages, including error locations. Patch by Sergey B Kirpichev.
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.