mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30: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
|
|
@ -60,7 +60,7 @@ class oldrange:
|
|||
if 0 <= i <= self.len:
|
||||
return self.start + self.step * i
|
||||
else:
|
||||
raise IndexError, 'range[i] index out of range'
|
||||
raise IndexError('range[i] index out of range')
|
||||
|
||||
|
||||
def test():
|
||||
|
|
@ -73,7 +73,7 @@ def test():
|
|||
raise Exception("error in implementation:\ncorrect = %s"
|
||||
"\nold-style = %s\ngenerator = %s" %
|
||||
(correct_result, oldrange_result, genrange_result))
|
||||
print "Timings for range(1000):"
|
||||
print("Timings for range(1000):")
|
||||
t1 = time.time()
|
||||
for i in oldrange(1000):
|
||||
pass
|
||||
|
|
@ -84,9 +84,9 @@ def test():
|
|||
for i in __builtin__.range(1000):
|
||||
pass
|
||||
t4 = time.time()
|
||||
print t2-t1, 'sec (old-style class)'
|
||||
print t3-t2, 'sec (generator)'
|
||||
print t4-t3, 'sec (built-in)'
|
||||
print(t2-t1, 'sec (old-style class)')
|
||||
print(t3-t2, 'sec (generator)')
|
||||
print(t4-t3, 'sec (built-in)')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue