Apart from a small return value typo, the patch looks good. But I think we should sort out whether the array.array semantics are desirable in the first place. http://bugs.python.org/review/15625/diff/5720/Objects/memoryobject.c File Objects/memoryobject.c (right): http://bugs.python.org/review/15625/diff/5720/Objects/memoryobject.c#newcode1820 Objects/memoryobject.c:1820: return NULL; This should return -1.