New submission from Dan Snider <mr.assume.a...@gmail.com>:

Unicode characters with code points above u+ffff can only be added to the end 
of an array, and only from a call to the "fromunicode" method. This is because 
"fromunicode" uses a different procedure to modify the array compared to 
__new__, __setitem__, append, and extend array methods, all of which eventually 
call u_setitem routine, which calls PyArg_Parse with a format spec of "u#". The 
error occurs in that call, from what at first glance appears to be an incorrect 
length determination for unicode objects of the 4 byte kind.

----------
components: Library (Lib)
messages: 355319
nosy: bup
priority: normal
severity: normal
status: open
title: 'u' formatted arrays mostly prevent appends of 4 byte characters
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38579>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to