[New-bugs-announce] [issue44664] builtins.chr and the 'c' format flag raise different errors

Dan Snider report at bugs.python.org
Sat Jul 17 18:40:19 EDT 2021


New submission from Dan Snider <mr.assume.away at gmail.com>:

chr (or anything else which calls `PyUnicode_FromOrdinal`) raises ValueError if its argument falls outside the range of valid Unicode code points, while `PyUnicode_FromFormat` raises OverflowError. Shouldn't the latter raise ValueError as well?

----------
messages: 397735
nosy: bup
priority: normal
severity: normal
status: open
title: builtins.chr and the 'c' format flag raise different errors
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44664>
_______________________________________


More information about the New-bugs-announce mailing list