Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Feature or enhancement
Proposal:
More discussion:#132504 (comment)
This is the current message which is not very clear (it comes fromctypes.sizeof):
>>>frommultiprocessingimportArray>>>Array('x',1)...TypeError:this typehasnosize
I propose we change it to:
>>>frommultiprocessingimportArray>>>Array('x',1)TypeError:badtypecode (mustbeactypestypeoroneofc,b,B,u,h,H,i,I,l,L,q,Q,ford)
This is modeled after the error message inarray.array which is more informative:
>>>array('x')...ValueError:badtypecode (mustbeb,B,u,w,h,H,i,I,l,L,q,Q,ford)
(AValueError seems 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.array does.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere