properties: add ObjectProperty

This commit is contained in:
Mathieu Virbel 2010-11-03 23:06:17 -04:00
parent e8708f4749
commit 784e3a67c3
1 changed files with 7 additions and 0 deletions

View File

@ -129,6 +129,13 @@ cdef class ListProperty(Property):
if type(value) is not list:
raise ValueError('Value of the property is not a list')
cdef class ObjectProperty(Property):
cdef check(self, obj, value):
if Property.check(self, obj, value):
return True
if not isinstance(value, object):
raise ValueError('Value accept only object')
cdef class BoundedNumericProperty(Property):
cdef int use_min
cdef int use_max