classification
Title: builtins.chr and the 'c' format flag raise different errors
Type: behavior Stage:
Components: Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: bup, jack__d, serhiy.storchaka
Priority: normal Keywords:

Created on 2021-07-17 22:40 by bup, last changed 2021-07-18 10:09 by serhiy.storchaka.

Messages (2)
msg397735 - (view) Author: Dan Snider (bup) * Date: 2021-07-17 22:40
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?
msg397745 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-07-18 10:09
Is there any example where it causes troubles?
History
Date User Action Args
2021-07-18 10:09:07serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg397745
2021-07-18 03:57:06jack__dsetnosy: + jack__d
2021-07-17 22:40:19bupcreate