Issue #20654: Fixed pydoc for enums with zero value. Patch by Vajrasky Kok.

This commit is contained in:
Serhiy Storchaka 2014-02-19 23:05:12 +02:00
parent 4ac30f1792
commit 056eb02719
3 changed files with 18 additions and 3 deletions

View file

@ -1244,9 +1244,12 @@ location listed above.
doc = getdoc(value)
else:
doc = None
push(self.docother(
getattr(object, name, None) or homecls.__dict__[name],
name, mod, maxlen=70, doc=doc) + '\n')
try:
obj = getattr(object, name)
except AttributeError:
obj = homecls.__dict__[name]
push(self.docother(obj, name, mod, maxlen=70, doc=doc) +
'\n')
return attrs
attrs = [(name, kind, cls, value)