Mercurial > p > roundup > code
diff test/benchmark.py @ 5376:64b05e24dbd8
Python 3 preparation: convert print to a function.
Tool-assisted patch. It is possible that some "from __future__ import
print_function" are not in fact needed, if a file only uses print()
with a single string as an argument and so would work fine in Python 2
without that import.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Tue, 24 Jul 2018 09:54:52 +0000 |
| parents | d41f38de578e |
| children | d26921b851c3 |
line wrap: on
line diff
--- a/test/benchmark.py Sat Jul 21 23:07:16 2018 +1000 +++ b/test/benchmark.py Tue Jul 24 09:54:52 2018 +0000 @@ -1,3 +1,4 @@ +from __future__ import print_function import sys, os, time from roundup.hyperdb import String, Password, Link, Multilink, Date, \ @@ -114,13 +115,13 @@ else: sys.stdout.write(' %-6.2f'%(stamp-last)) last = stamp - print ' %-6.2f'%(last-first) + print(' %-6.2f'%(last-first)) sys.stdout.flush() if __name__ == '__main__': # 0 1 2 3 4 5 6 # 01234567890123456789012345678901234567890123456789012345678901234 - print 'Test name fetch journl jprops lookup filter filtml TOTAL ' + print('Test name fetch journl jprops lookup filter filtml TOTAL ') for name in 'anydbm metakit sqlite'.split(): main(name) for name in 'anydbm metakit sqlite'.split():
