end of print = lower productivity ?

Paul Rubin http
Tue Nov 25 17:03:53 EST 2008


cptnwillard at gmail.com writes:
> > BUT you now can do
> > >>> p = print
> > >>> p("f")

> All right. Let's talk about that.
> 
> When I write "print", it is both effortless and instantaneous : my
> hands do not move, a wave goes through my fingers, it all happens in a
> tenth of a second.
> 
> Contrast this with what one has to go through to catch the SHIFT key ...

You could say:

    class Printer:
        def __isub__(self, x): print(x)
    p = Printer()

Then

    p-= "foo"

doesn't need use of the shift key.  Use of -= instead of - gets rid
of operator precedence issues.



More information about the Python-list mailing list