Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit400f5ed

Browse files
committed
More general adaptation of showsyntaxerror() to Python 3.13
Python 3.13's code.InteractiveInterpreter adds a new **kwargsargument to its showsyntaxerror() method. Currently, the onlyuse of it is to send a named argument of name "source". Whilstthe current adapation of repl.Interpreter is specific and shouldwork in the short term, here is a more general solution.
1 parent5b31cca commit400f5ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎bpython/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def runsource(
153153
returnsuper().runsource(source,filename,symbol)
154154

155155
defshowsyntaxerror(
156-
self,filename:Optional[str]=None,source:Optional[str]=None
156+
self,filename:Optional[str]=None,**kwargs
157157
)->None:
158158
"""Override the regular handler, the code's copied and pasted from
159159
code.py, as per showtraceback, but with the syntaxerror callback called

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp