分类: Python/Ruby
2009-04-17 09:53:29
D:\workspace\python>python -m timeit -s 'str = "hello"' "if hasattr(str, '__bool__'): pass" Traceback (most recent call last): File "C:\Python30\lib\runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Python30\lib\runpy.py", line 34, in _run_code exec(code, run_globals) File "C:\Python30\lib\timeit.py", line 327, in sys.exit(main()) File "C:\Python30\lib\timeit.py", line 291, in main t = Timer(stmt, setup, timer) File "C:\Python30\lib\timeit.py", line 135, in __init__ code = compile(src, dummy_src_name, "exec" ) File " 'str ^ SyntaxError: EOL while scanning string literal |