1.1 --- a/micropython/__init__.py Mon Feb 02 01:34:35 2009 +0100
1.2 +++ b/micropython/__init__.py Sat Feb 07 22:04:24 2009 +0100
1.3 @@ -223,8 +223,11 @@
1.4
1.5 if not with_builtins and item.module.name == "__builtins__":
1.6 item.code_location = item.full_name()
1.7 +
1.8 + # Skip any defaults.
1.9 +
1.10 else:
1.11 - item.code_location = pos
1.12 + item.code_location = pos + len(item.defaults)
1.13
1.14 elif isinstance(item, micropython.data.Const):
1.15 pos += len(self.raw_data(item))
1.16 @@ -309,7 +312,7 @@
1.17 # Check the code location only where the code has been generated.
1.18
1.19 assert (not with_builtins and item.module.name == "__builtins__") or \
1.20 - item.code_location == len(self.raw_code)
1.21 + item.code_location == len(self.raw_code) + len(item.defaults)
1.22
1.23 elif isinstance(item, micropython.data.Module):
1.24 assert item.location == len(self.raw_code)