diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-12-01 10:31:34 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-12-01 10:31:34 +0100 |
commit | d038ae380bfd3291aa2ceddc9f1eb365e2fb3942 (patch) | |
tree | cab04106defd3caf8b557c0c6b9595b1aed775e4 /rebuilder.py | |
parent | 9ff3beb68314ade13fa58f3e67c97b0ed00abd31 (diff) | |
download | astroid-git-d038ae380bfd3291aa2ceddc9f1eb365e2fb3942.tar.gz |
cleanup: just define "extra_decorators" in Function constructor
Diffstat (limited to 'rebuilder.py')
-rw-r--r-- | rebuilder.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/rebuilder.py b/rebuilder.py index ea7e9848..f0f877d7 100644 --- a/rebuilder.py +++ b/rebuilder.py @@ -293,10 +293,7 @@ class TreeRebuilder(RebuildVisitor): if isinstance(meth, new.Function): if func_name in ('classmethod', 'staticmethod'): meth.type = func_name - try: # XXX use setdefault ? - meth.extra_decorators.append(newnode.value) - except AttributeError: - meth.extra_decorators = [newnode.value] + meth.extra_decorators.append(newnode.value) except (AttributeError, KeyError): continue elif getattr(newnode.targets[0], 'name', None) == '__metaclass__': |