Issue 4364: error in multiprocessing docs - rawvalue (original) (raw)

There is an error in the multiprocessing package documentation: In the sentence:

'Note that an array of ctypes.c_char has value and rawvalue attributes which allow one to use it to store and retrieve strings.'

The error is that 'rawvalue' should be 'raw'. This sentence actually occurs in two places: under multiprocessing.Array and just before multiprocessing.sharedctypes.Array. It looks to me like the second occurrence of the sentence is in the wrong place - I think it should be in the multiprocessing.sharedctypes.Array section instead of just before it.

To see that the attribute name is 'raw', just do:

import ctypes, multiprocessing dir(multiprocessing.Array(ctypes.c_char, 1))

==> ['class', 'delattr', 'dict', 'doc', 'format', 'getattribute', 'getitem', 'getslice', 'hash', 'init', 'len', 'module', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'setitem', 'setslice', 'sizeof', 'str', 'subclasshook', 'weakref', '_lock', '_obj', 'acquire', 'get_lock', 'get_obj', 'raw', 'release', 'value']