Fix multivalue params requiring default to be of type self.type instead of tuple.

This commit is contained in:
Pavel Zuna 2009-02-23 18:55:36 +01:00 committed by Rob Crittenden
parent 016b82250e
commit e913d7483b

View File

@ -259,7 +259,10 @@ class Param(ReadOnly):
# Add 'default' to self.kwargs and makes sure no unknown kw were given:
assert type(self.type) is type
self.kwargs += (('default', self.type, None),)
if kw.get('multivalue', True):
self.kwargs += (('default', tuple, None),)
else:
self.kwargs += (('default', self.type, None),)
if not set(t[0] for t in self.kwargs).issuperset(self.__kw):
extra = set(kw) - set(t[0] for t in self.kwargs)
raise TypeError(