[Python-announce] peek: like print, but easy
Ruud van der Ham via Python-announce-list <[email protected]> Sun, 1 Dec 2024 18:59:30 +0100
| Newsgroups | gmane.comp.python.announce |
|---|---|
| Message-ID | <CAB-X1xGCQADN636FGmKP9HQsK4raEy6_Qae+_=jEqHhEaWeUqA@mail.gmail.com> |
This is to announce the availability of a new package: peek.
To include powerful debug print statement, all you have to do is:
import peek
my_string = "hallo"
my_dict = dict(a=1, b=2)
peek(my_string, my_dict)
And you get
my_string='hallo', my_dict={'a': 1, 'b': 2}
Or, if you add
peek.show_line_number = True
you get something like
#5 ==> my_string='hallo', my_dict={'a': 1, 'b': 2}
For those who know icecream: peek goes much further in adding benchmarking,
a Pythonic interface, import time customization, better docs, etc.
And ... no dependencies whatsoever!
For more information, see www.salabim.org/peek
_______________________________________________
Python-announce-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: [email protected]