gh-80480: array: Add 'w' typecode. (#105242)

This commit is contained in:
Inada Naoki 2023-06-05 01:45:00 +09:00 committed by GitHub
parent 5a5ed7a3e6
commit 1237fb6a4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 159 additions and 59 deletions

View file

@ -924,12 +924,12 @@ module::
'Hello, there!'
>>> import array
>>> a = array.array('u', s)
>>> a = array.array('w', s)
>>> print(a)
array('u', 'Hello, world')
array('w', 'Hello, world')
>>> a[0] = 'y'
>>> print(a)
array('u', 'yello, world')
array('w', 'yello, world')
>>> a.tounicode()
'yello, world'