You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've looked into this and it's frustrating because array.array('u', n) is a container of characters (PY_UNICODE, and later wchar_t), not bytes, so to switch one would need to manage characters at byte level with some encoding. It may be easier to detect an array.array type that is 4 bytes and use that along with UCS-4/UTF-32. I'm hopeful that https://bugs.python.org/issue36299 will yield an alternative before this becomes an issue.
Python 3.12 will have a UCS-4 array type of 'w', so there's a reasonable transition path: if we find 'w' in array.typecodes then we use it, otherwise we keep using 'u'.
because arrary.array('u', n) is deprecated and bytearrays are part of the core language now
The text was updated successfully, but these errors were encountered: