make multiprocessing.sharedctypes.Value's lock argument a keyword-only argument for real

This commit is contained in:
Benjamin Peterson 2008-06-27 22:16:47 +00:00
parent ce279a7275
commit d5cd65b72c
1 changed files with 1 additions and 4 deletions

View File

@ -62,13 +62,10 @@ def RawArray(typecode_or_type, size_or_initializer):
result.__init__(*size_or_initializer) result.__init__(*size_or_initializer)
return result return result
def Value(typecode_or_type, *args, **kwds): def Value(typecode_or_type, *args, lock=None):
''' '''
Return a synchronization wrapper for a Value Return a synchronization wrapper for a Value
''' '''
lock = kwds.pop('lock', None)
if kwds:
raise ValueError('unrecognized keyword argument(s): %s' % list(kwds.keys()))
obj = RawValue(typecode_or_type, *args) obj = RawValue(typecode_or_type, *args)
if lock is None: if lock is None:
lock = RLock() lock = RLock()