]> granicus.if.org Git - python/commit
bpo-29843: raise AttributeError if given negative _length_ (GH-10029)
authorTal Einat <taleinat+github@gmail.com>
Mon, 22 Oct 2018 15:33:10 +0000 (18:33 +0300)
committerGitHub <noreply@github.com>
Mon, 22 Oct 2018 15:33:10 +0000 (18:33 +0300)
commit2447773573e74819e163f8963ab107bc5db123e5
tree4db0104b09186c80bdcf9d0d7feeeb0390b89a61
parent121eb1694cab14df857ba6abe9839654cada15cf
bpo-29843: raise AttributeError if given negative _length_ (GH-10029)

Raise ValueError OverflowError in case of a negative
_length_ in a ctypes.Array subclass.  Also raise TypeError
instead of AttributeError for non-integer _length_.

Co-authored-by: Oren Milman <orenmn@gmail.com>
Lib/ctypes/test/test_arrays.py
Misc/NEWS.d/next/Core and Builtins/2018-10-21-17-43-48.bpo-29743.aeCcKR.rst [new file with mode: 0644]
Modules/_ctypes/_ctypes.c