Use ContextualizedNode instead of Node in get_calling_nodes

This improves working with these nodes by a lot.
This commit is contained in:
Dave Halter
2018-12-22 14:55:20 +01:00
parent ca784916bb
commit 1065768c77
4 changed files with 41 additions and 23 deletions

View File

@@ -87,3 +87,21 @@ else:
str.upper
#! 4 attribute-error
str.undefined
# -----------------
# arguments
# -----------------
def i_see(r):
return r
def lala():
# This weird structure checks if the error is actually resolved in the
# right place.
a = TypeError
try:
i_see()
except a:
pass
#! 5 type-error-too-few-arguments
i_see()