From 65b1d1998f560c03c7cc204b0ee4f5c9c4f517e0 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 17 Dec 2011 15:40:10 -0500 Subject: Allow one-element CSG operations. --- libdimension-python/dimension.pyx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx index 1e79620..6a76974 100644 --- a/libdimension-python/dimension.pyx +++ b/libdimension-python/dimension.pyx @@ -1273,8 +1273,8 @@ cdef class Union(Object): Additionally, Union() accepts any arguments that Object() accepts. """ - if len(objects) < 2: - raise TypeError("expected a list of two or more Objects") + if len(objects) < 1: + raise TypeError("expected a list of one or more Objects") cdef dmnsn_array *array = dmnsn_new_array(sizeof(dmnsn_object *)) cdef dmnsn_object *o @@ -1302,8 +1302,8 @@ cdef class Intersection(Object): Additionally, Intersection() accepts any arguments that Object() accepts. """ - if len(objects) < 2: - raise TypeError("expected a list of two or more Objects") + if len(objects) < 1: + raise TypeError("expected a list of one or more Objects") cdef dmnsn_object *o @@ -1329,8 +1329,8 @@ cdef class Difference(Object): Additionally, Difference() accepts any arguments that Object() accepts. """ - if len(objects) < 2: - raise TypeError("expected a list of two or more Objects") + if len(objects) < 1: + raise TypeError("expected a list of one or more Objects") cdef dmnsn_object *o @@ -1356,8 +1356,8 @@ cdef class Merge(Object): Additionally, Merge() accepts any arguments that Object() accepts. """ - if len(objects) < 2: - raise TypeError("expected a list of two or more Objects") + if len(objects) < 1: + raise TypeError("expected a list of one or more Objects") cdef dmnsn_object *o -- cgit v1.2.3