improve error message on slice deletion
authorStefan Behnel <stefan_ml@behnel.de>
Sat, 16 Mar 2013 22:34:36 +0000 (23:34 +0100)
committerStefan Behnel <stefan_ml@behnel.de>
Sat, 16 Mar 2013 22:34:36 +0000 (23:34 +0100)
Cython/Utility/ObjectHandling.c

index c2970c1..af33353 100644 (file)
@@ -581,7 +581,8 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
 {{if access == 'Get'}}
         "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
 {{else}}
-        "'%.200s' object does not support slice assignment", Py_TYPE(obj)->tp_name);
+        "'%.200s' object does not support slice %s",
+        Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
 {{endif}}
 
 bad: