Fix the Enum constructor, and document the change
This commit is contained in:
parent
3ada92fbf1
commit
b49f992d1d
@ -18,6 +18,9 @@ Changes
|
||||
|
||||
* RESTful protocol can now use the http method.
|
||||
|
||||
* UserTypes can now be given a name that will be used in the
|
||||
documentation.
|
||||
|
||||
0.3 (2012-04-20)
|
||||
----------------
|
||||
|
||||
|
@ -134,7 +134,7 @@ class Enum(UserType):
|
||||
def __init__(self, basetype, *values, **kw):
|
||||
self.basetype = basetype
|
||||
self.values = set(values)
|
||||
name = kw.pop('name')
|
||||
name = kw.pop('name', None)
|
||||
if name is None:
|
||||
name = "Enum(%s)" % ', '.join((str(v) for v in values))
|
||||
self.name = name
|
||||
|
Loading…
x
Reference in New Issue
Block a user