1.1 --- a/micropython/inspect.py Sun May 31 18:44:40 2009 +0200
1.2 +++ b/micropython/inspect.py Mon Jun 01 02:41:57 2009 +0200
1.3 @@ -321,6 +321,8 @@
1.4 None.
1.5 """
1.6
1.7 + # Define the function object.
1.8 +
1.9 function = Function(
1.10 name,
1.11 self.get_parent(),
1.12 @@ -332,6 +334,8 @@
1.13 node
1.14 )
1.15
1.16 + self.add_object(function, any_scope=1)
1.17 +
1.18 # Make a back reference from the node for code generation.
1.19
1.20 node.unit = function
1.21 @@ -377,7 +381,6 @@
1.22 if node.defaults:
1.23 return Instance() # indicates no known target
1.24
1.25 - self.add_object(function, any_scope=1)
1.26 return function
1.27
1.28 # Specific handler methods.