[Python-announce] peek: like print, but easy

Liste des GroupesRevenir à clp announce 
Sujet : [Python-announce] peek: like print, but easy
De : rt.van.der.ham (at) *nospam* gmail.com (Ruud van der Ham)
Groupes : comp.lang.python.announce
Date : 01. Dec 2024, 18:59:30
Autres entêtes
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

Date Sujet#  Auteur
1 Dec 24 o [Python-announce] peek: like print, but easy1Ruud van der Ham

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal