Skip to content

Commit 9ed3e2b

Browse files
author
Andy Landy
committed
add fast str casts to readme
1 parent 3fec065 commit 9ed3e2b

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![Example](https://raw.githubusercontent.com/andy-landy/traceback_with_variables/master/header.png)
22

33
<h2 align="center">Python Traceback (Error Message) Printing Variables</h2>
4-
<p align="center">Very simple to use, but versatile when needed. Try for debug and keep for small-scale production.</p>
4+
<p align="center">Very simple to use and fast, but versatile when needed. Try for debug and keep for small-scale production.</p>
55

66
<p align="center">
77
<a href="https://github.com/andy-landy/traceback_with_variables/actions"><img alt="Actions Status" src="https://github.com/andy-landy/traceback_with_variables/workflows/tests/badge.svg"></a>
@@ -262,7 +262,14 @@ Using a logger [<a href="https://github.com/andy-landy/traceback_with_variables/
262262
step 5: Examine the printouts and possibly add some more info (then go back to step 2). \
263263
step 6: Erase all recently added printouts, logging and exception messages. \
264264
step 7: Go back to step 1 once bugs appear.
265-
265+
266+
267+
* — Is it slow? I have huge lists and dicts and data objects!
268+
269+
Data size doesn't matter, the objects are printed smartly, so only the result suffix and prefix are generated:
270+
e.g. `list(range(100000000))` becomes `[0, 1, 2, ...9998, 99999999]`
271+
Use `fmt`'s `.max_value_str_len`, and `.rel_ellipsis_pos` (0.0 to 1.0) to tweak the output.
272+
266273

267274
### Examples and recipes
268275

README.tmpl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![Example]({{ content_url }}/header.png)
22

33
<h2 align="center">Python Traceback (Error Message) Printing Variables</h2>
4-
<p align="center">Very simple to use, but versatile when needed. Try for debug and keep for small-scale production.</p>
4+
<p align="center">Very simple to use and fast, but versatile when needed. Try for debug and keep for small-scale production.</p>
55

66
<p align="center">
77
<a href="{{ repo_url }}/actions"><img alt="Actions Status" src="{{ repo_url }}/workflows/tests/badge.svg"></a>
@@ -262,7 +262,14 @@ Using a logger [<a href="{{ examples_code_url }}/log_for_function.py">with a dec
262262
step 5: Examine the printouts and possibly add some more info (then go back to step 2). \
263263
step 6: Erase all recently added printouts, logging and exception messages. \
264264
step 7: Go back to step 1 once bugs appear.
265-
265+
266+
267+
* — Is it slow? I have huge lists and dicts and data objects!
268+
269+
Data size doesn't matter, the objects are printed smartly, so only the result suffix and prefix are generated:
270+
e.g. `list(range(100000000))` becomes `[0, 1, 2, ...9998, 99999999]`
271+
Use `fmt`'s `.max_value_str_len`, and `.rel_ellipsis_pos` (0.0 to 1.0) to tweak the output.
272+
266273

267274
### Examples and recipes
268275

0 commit comments

Comments
 (0)