(object=None)
| 641 | |
| 642 | |
| 643 | def _perfcheck(object=None): |
| 644 | import time |
| 645 | if object is None: |
| 646 | object = [("string", (1, 2), [3, 4], {5: 6, 7: 8})] * 100000 |
| 647 | p = PrettyPrinter() |
| 648 | t1 = time.perf_counter() |
| 649 | p._safe_repr(object, {}, None, 0, True) |
| 650 | t2 = time.perf_counter() |
| 651 | p.pformat(object) |
| 652 | t3 = time.perf_counter() |
| 653 | print("_safe_repr:", t2 - t1) |
| 654 | print("pformat:", t3 - t2) |
| 655 | |
| 656 | def _wrap_bytes_repr(object, width, allowance): |
| 657 | current = b'' |
no test coverage detected