You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
350 B

try:
memoryview(b'a').itemsize
from array import array
except:
print("SKIP")
raise SystemExit
for code in ['b', 'h', 'i', 'l', 'q', 'f', 'd']:
print(memoryview(array(code)).itemsize)
# shouldn't be able to store to the itemsize attribute
try:
memoryview(b'a').itemsize = 1
except AttributeError:
print('AttributeError')