mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.
This commit is contained in:
parent
a8c360ee76
commit
6f2df4d5e1
132 changed files with 1070 additions and 1080 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue