Skip to content
Merged
Show file tree
Hide file tree
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
fixup! Move comment to the appropriate alt
  • Loading branch information
pablogsal committed Feb 13, 2025
commit 2d7f8c654bef4fe3d50803f93262b285233f57cc
13 changes: 12 additions & 1 deletion Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Improved error messages
error message prints the received number of values in more cases than before.
(Contributed by Tushar Sadhwani in :gh:`122239`.)

.. code-block:: pycon
.. code-block:: python
>>> x, y, z = 1, 2, 3, 4
Traceback (most recent call last):
Expand All @@ -175,6 +175,17 @@ Improved error messages
ValueError: too many values to unpack (expected 3, got 4)
* When incorrectly closed strings are detected, the error message suggests
that the string may be intended to be part of the string. (Contributed by
Pablo Galindo in :gh:`88535`.)

.. code-block:: python
>>> "The interesting object "The important object" is very important"
Traceback (most recent call last):
SyntaxError: invalid syntax. Is this intended to be part of the string?
.. _whatsnew314-pep741:

PEP 741: Python Configuration C API
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2303,7 +2303,7 @@ def test_encodings(self):
)
err = run_script(source.encode('cp437'))
self.assertEqual(err[-3], ' "¢¢¢¢¢¢" + f(4, x for x in range(1))')
self.assertEqual(err[-2], ' ^^^^^^^^^^^^^^^^^^^')
self.assertEqual(err[-2], ' ^^^')

# Check backwards tokenizer errors
source = '# -*- coding: ascii -*-\n\n(\n'
Expand Down
Loading