Show More
@@ -767,14 +767,14 python-profiler package from non-free.""") | |||
|
767 | 767 | # this code has tight coupling to the inner workings of timeit.Timer, |
|
768 | 768 | # but is there a better way to achieve that the code stmt has access |
|
769 | 769 | # to the shell namespace? |
|
770 | ||
|
770 | transform = self.shell.input_splitter.transform_cell | |
|
771 | 771 | if cell is None: |
|
772 | 772 | # called as line magic |
|
773 | 773 | setup = 'pass' |
|
774 | stmt = timeit.reindent(stmt, 8) | |
|
774 | stmt = timeit.reindent(transform(stmt), 8) | |
|
775 | 775 | else: |
|
776 | setup = timeit.reindent(stmt, 4) | |
|
777 | stmt = timeit.reindent(cell, 8) | |
|
776 | setup = timeit.reindent(transform(stmt), 4) | |
|
777 | stmt = timeit.reindent(transform(cell), 8) | |
|
778 | 778 | |
|
779 | 779 | # From Python 3.3, this template uses new-style string formatting. |
|
780 | 780 | if sys.version_info >= (3, 3): |
General Comments 0
You need to be logged in to leave comments.
Login now