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
{{ message }}
Repository navigation
[array doc] Possible missing deprecation warnings? #71446
Since the array.fromunicode() and array.tounicode() methods depend on type code 'u' shouldn't they also be marked as deprecated?
If people use the 'u' type code maybe it would be helpful to provide an example of how to store unicode chars in an array.array? (Presumably they'd use type code 'L' and use ord() and chr()?)
Hi, the 'w' typecode was added in #105242, and array.fromunicode / array.tounicode support it, so we should keep them. We can also use the 'w' typecode to store Unicode.
Activity
mark-summerfield commentedon Jun 7, 2016
In the docs for the array module:
https://docs.python.org/dev/library/array.html#module-array
Note 1 in the table of type codes says that the 'u' type is deprecated and will go in Python 4.0.
Since the array.fromunicode() and array.tounicode() methods depend on type code 'u' shouldn't they also be marked as deprecated?
If people use the 'u' type code maybe it would be helpful to provide an example of how to store unicode chars in an array.array? (Presumably they'd use type code 'L' and use ord() and chr()?)
[-]Possible missing deprecation warnings?[/-][+][array doc] Possible missing deprecation warnings?[/+]aisk commentedon Jan 11, 2026
Hi, the
'w'typecode was added in #105242, andarray.fromunicode/array.tounicodesupport it, so we should keep them. We can also use the'w'typecode to store Unicode.So I think we can close this issue as completed.
aisk commentedon Feb 2, 2026
Closing this as mentioned above. Please feel free to reopen it if I’m mistaken.