Feature or enhancement
Proposal:
More discussion: #132504 (comment)
This is the current message which is not very clear (it comes from ctypes.sizeof):
>>> from multiprocessing import Array
>>> Array('x', 1)
...
TypeError: this type has no size
I propose we change it to:
>>> from multiprocessing import Array
>>> Array('x', 1)
TypeError: bad typecode (must be a ctypes type or one of c, b, B, u, h, H, i, I, l, L, q, Q, f or d)
This is modeled after the error message in array.array which is more informative:
>>> array('x')
...
ValueError: bad typecode (must be b, B, u, w, h, H, i, I, l, L, q, Q, f or d)
(A ValueError seems like a more appropriate option for multiprocessing as well, but that'd be a breaking change)
Note that, multiprocessing.Array (and Value) does not support the 'w' typecode while array.array does.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
#132504 (comment)
Linked PRs
Feature or enhancement
Proposal:
More discussion: #132504 (comment)
This is the current message which is not very clear (it comes from
ctypes.sizeof):I propose we change it to:
This is modeled after the error message in
array.arraywhich is more informative:(A
ValueErrorseems like a more appropriate option for multiprocessing as well, but that'd be a breaking change)Note that,
multiprocessing.Array(andValue) does not support the 'w' typecode whilearray.arraydoes.Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
#132504 (comment)
Linked PRs
multiprocessing.{Array,Value}#133252