Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.

This commit is contained in:
Collin Winter 2007-07-17 20:59:35 +00:00
parent a8c360ee76
commit 6f2df4d5e1
132 changed files with 1070 additions and 1080 deletions

View file

@ -15,20 +15,20 @@ class FancyCounter(handler.ContentHandler):
self._attrs = self._attrs + len(attrs)
self._elem_types[name] = self._elem_types.get(name, 0) + 1
for name in attrs.keys():
for name in list(attrs.keys()):
self._attr_types[name] = self._attr_types.get(name, 0) + 1
def endDocument(self):
print "There were", self._elems, "elements."
print "There were", self._attrs, "attributes."
print("There were", self._elems, "elements.")
print("There were", self._attrs, "attributes.")
print "---ELEMENT TYPES"
for pair in self._elem_types.items():
print "%20s %d" % pair
print("---ELEMENT TYPES")
for pair in list(self._elem_types.items()):
print("%20s %d" % pair)
print "---ATTRIBUTE TYPES"
for pair in self._attr_types.items():
print "%20s %d" % pair
print("---ATTRIBUTE TYPES")
for pair in list(self._attr_types.items()):
print("%20s %d" % pair)
parser = make_parser()