end of print = lower productivity ?

peter peter.sabaini at gmail.com
Tue Nov 25 11:05:34 EST 2008


On Nov 25, 4:44 pm, cptnwill... at gmail.com wrote:
> I want my productivity back.
>
> In Python 2.x, I could easily write things like -- print "f" / print
> "add" / print "done" -- to a lot of different places in my code, which
> allowed me to find bugs that I could not track otherwise. When I found
> out that "f" was not at fault, I could write -- print "g" -- to some
> other place... etc, so that a significant part of the time spent
> debugging was actually used to write print statements.
>
> Now the print statement disappeared, and I have to write print("f")
> instead. These parentheses not only take time to write, they also make
> me think twice about using print for debugging purposes. Pressing <
> SHIFT > then < ( > then < " > makes the whole process quite a hassle.
>
> I agree with most of the arguments that have been made against using
> the print statement to build code, but I did care about the efficient
> debugging tool it was.

BUT you now can do

>>> p = print
>>> p("f")

Voila, 4 keystrokes saved :-)





More information about the Python-list mailing list