summaryrefslogtreecommitdiff
path: root/scoped_nodes.py
diff options
context:
space:
mode:
Diffstat (limited to 'scoped_nodes.py')
-rw-r--r--scoped_nodes.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scoped_nodes.py b/scoped_nodes.py
index 95d45a5d..f0708379 100644
--- a/scoped_nodes.py
+++ b/scoped_nodes.py
@@ -46,6 +46,7 @@ from astroid.bases import Statement
from astroid.manager import AstroidManager
ITER_METHODS = ('__iter__', '__getitem__')
+PY3K = sys.version_info >= (3, 0)
def remove_nodes(func, cls):
@@ -562,7 +563,11 @@ class Lambda(LocalsDictNodeNG, FilterStmtsMixin):
class Function(Statement, Lambda):
- _astroid_fields = ('decorators', 'args', 'body')
+ if PY3K:
+ _astroid_fields = ('decorators', 'args', 'body', 'returns')
+ returns = None
+ else:
+ _astroid_fields = ('decorators', 'args', 'body')
special_attributes = set(('__name__', '__doc__', '__dict__'))
is_function = True