1.1 --- a/micropython/report.py Sat Aug 21 03:05:26 2010 +0200
1.2 +++ b/micropython/report.py Sun Aug 22 20:34:46 2010 +0200
1.3 @@ -229,14 +229,15 @@
1.4
1.5 self._summary_link(module.full_name(), obj.full_name(), obj.name, classes)
1.6
1.7 - def _object_name_ref(self, module, obj, classes=None):
1.8 + def _object_name_ref(self, module, obj, name=None, classes=None):
1.9
1.10 """
1.11 - Link to the definition for 'module' using 'obj'. The optional 'classes'
1.12 + Link to the definition for 'module' using 'obj' with the optional 'name'
1.13 + used as the label (instead of the name of 'obj'). The optional 'classes'
1.14 can be used to customise the CSS classes employed.
1.15 """
1.16
1.17 - self._name_link(module.full_name(), obj.full_name(), obj.name, classes)
1.18 + self._name_link(module.full_name(), obj.full_name(), name or obj.name, classes)
1.19
1.20 def _summary_link(self, module_name, full_name, name, classes=None):
1.21 self._name_link("%s-summary" % module_name, full_name, name, classes)
1.22 @@ -285,14 +286,14 @@
1.23 self._names_list(typenames, "types", "typenames")
1.24
1.25 def _accessor_start(self, target_names):
1.26 - if target_names is not None:
1.27 + if target_names:
1.28 self._span_start("accessor")
1.29 self._popup_start("types-popup")
1.30 self._typenames(target_names)
1.31 self._popup_end()
1.32
1.33 def _accessor_end(self, target_names):
1.34 - if target_names is not None:
1.35 + if target_names:
1.36 self._span_end()
1.37
1.38 # Summary classes.
1.39 @@ -373,7 +374,7 @@
1.40 if attr.is_strict_constant():
1.41 value = attr.get_value()
1.42 self.stream.write("<td class='summary-class-attr' id='%s'>" % self._attr(value.full_name()))
1.43 - self._object_name_ref(self.module, value, classes="summary-ref")
1.44 + self._object_name_ref(self.module, value, attr.name, classes="summary-ref")
1.45 self.stream.write("</td>\n")
1.46 else:
1.47 self.stream.write("<td class='summary-class-attr'>%s</td>\n" % self._text(attr.name))
1.48 @@ -921,7 +922,7 @@
1.49
1.50 def visitListCompFor(self, node):
1.51 self._span_start("listcompfor")
1.52 - self._keyword("for")
1.53 + self._keyword("for", 1)
1.54 self._span_start("item")
1.55 self.dispatch(node.assign)
1.56 self._span_end()