Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
>>> match1:... case {0: _,0j: _}:...passTraceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/home/sk/src/cpython/Lib/_pyrepl/__main__.py", line 47, in <module> interactive_console() ~~~~~~~~~~~~~~~~~~~^^ File "/home/sk/src/cpython/Lib/_pyrepl/__main__.py", line 44, in interactive_console return run_interactive(mainmodule) File "/home/sk/src/cpython/Lib/_pyrepl/simple_interact.py", line 176, in run_multiline_interactive_console more = console.push(_strip_final_indent(statement), filename=input_name, _symbol="single") # type: ignore[call-arg] File "/home/sk/src/cpython/Lib/code.py", line 303, in push more = self.runsource(source, filename, symbol=_symbol) File "/home/sk/src/cpython/Lib/_pyrepl/simple_interact.py", line 98, in runsource code = compile(item, filename, the_symbol) File "<python-input-0>", line 2SyntaxError: mapping pattern checks duplicate key (0j)
At that point I'm in the system shell...
C.f.:
>>>deff():...raiseValueError("boo!")... >>> f()Traceback (most recent call last): File "<python-input-1>", line 1, in <module> f() ~^^ File "<python-input-0>", line 2, in f raise ValueError("boo!")ValueError: boo!>>>3.to_bytes() File "<unknown>", line 1 3.to_bytes() ^SyntaxError: invalid decimal literal
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response