-
- Downloads
py: Allow bytes/bytearray/array to be init'd by buffer protocol objects.
Behaviour of array initialisation is subtly different for bytes, bytearray and array.array when argument has buffer protocol. This patch gets us CPython conformant (except we allow initialisation of array.array by buffer with length not a multiple of typecode).
Showing
- py/objarray.c 22 additions, 4 deletionspy/objarray.c
- py/objstr.c 6 additions, 0 deletionspy/objstr.c
- tests/basics/array_construct.py 18 additions, 0 deletionstests/basics/array_construct.py
- tests/basics/bytearray_construct.py 14 additions, 0 deletionstests/basics/bytearray_construct.py
- tests/basics/bytes_construct.py 14 additions, 0 deletionstests/basics/bytes_construct.py
Loading
Please register or sign in to comment