From b1c4c17d3d8432ccbba983f7cc89bed52573830f Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Mon, 29 Oct 2012 09:29:51 +0100 Subject: Giving a TypeError doesn't make much sense here, even though CPython's buffer type does it. --- c/minibuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'c/minibuffer.h') diff --git a/c/minibuffer.h b/c/minibuffer.h index 8f4cf2e..3504e8b 100644 --- a/c/minibuffer.h +++ b/c/minibuffer.h @@ -70,7 +70,7 @@ static int mb_ass_slice(MiniBufferObj *self, count = right - left; if (count != buffer_len) { - PyErr_SetString(PyExc_TypeError, + PyErr_SetString(PyExc_ValueError, "right operand length must match slice length"); return -1; } -- cgit v1.2.1