1.1 --- a/micropython/trans.py Sun Feb 14 16:28:12 2010 +0100
1.2 +++ b/micropython/trans.py Sun Feb 14 23:49:17 2010 +0100
1.3 @@ -315,9 +315,20 @@
1.4
1.5 for name, names_used in node._attrnames.items():
1.6
1.7 + # Consider alternatives.
1.8 +
1.9 + if node._alternative_attrnames.has_key(name):
1.10 + all_names_used = set()
1.11 + all_names_used.update(node._alternative_attrnames)
1.12 + all_names_used.add(tuple(names_used))
1.13 + else:
1.14 + all_names_used = [names_used]
1.15 +
1.16 # Get the names of all object types supporting these names.
1.17
1.18 - targets = self.objtable.all_possible_objects_plus_status(names_used)
1.19 + targets = set()
1.20 + for names_used in all_names_used:
1.21 + targets.update(self.objtable.all_possible_objects_plus_status(names_used))
1.22
1.23 # Where only one object type is suggested, produce a guard.
1.24 # NOTE: This only supports classes as types, not modules.