Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Nov 29, 2025

This affects string formatting as well as bytes and bytearray formatting.

  • For errors in the format string, always include the position of the start of the format unit.
  • For errors related to the formatted arguments, always include the number or the name of the argument.
  • Suggest more probable causes of errors in the format string (stray %, unsupported format, unexpected character).
  • Provide more information when the number of arguments does not match the number of format units.
  • Raise more specific errors when access of arguments by name is mixed with sequential access and if * is used with a mapping.
  • Add tests for some uncovered cases.

This affects string formatting as well as bytes and bytearray formatting.

* For errors in the format string, always include the position of the
  start of the format unit.
* For errors related to the formatted arguments, always include the number
  or the name of the argument.
* Suggest more probable causes of errors in the format string (stray %,
  unsupported format, unexpected character).
* Provide more information when the number of arguments does not match
  the number of format units.
* Raise more specific errors when access of arguments by name is mixed with
  sequential access and if * is used with a mapping.
* Add tests for some uncovered cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant