equal
deleted
inserted
replaced
2127 default: Optional default value; if omitted, an empty list is used. |
2127 default: Optional default value; if omitted, an empty list is used. |
2128 **kwds: Optional additional keyword arguments, passed to base class. |
2128 **kwds: Optional additional keyword arguments, passed to base class. |
2129 |
2129 |
2130 Note that the only permissible value for 'required' is True. |
2130 Note that the only permissible value for 'required' is True. |
2131 """ |
2131 """ |
|
2132 if item_type is str: |
|
2133 item_type = basestring |
2132 if not isinstance(item_type, type): |
2134 if not isinstance(item_type, type): |
2133 raise TypeError('Item type should be a type object') |
2135 raise TypeError('Item type should be a type object') |
2134 if item_type not in _ALLOWED_PROPERTY_TYPES: |
2136 if item_type not in _ALLOWED_PROPERTY_TYPES: |
2135 raise ValueError('Item type %s is not acceptable' % item_type.__name__) |
2137 raise ValueError('Item type %s is not acceptable' % item_type.__name__) |
2136 if 'required' in kwds and kwds['required'] is not True: |
2138 if 'required' in kwds and kwds['required'] is not True: |