[Tutor] Olle-Olla

János Juhász janos.juhasz at VELUX.com
Tue Apr 18 15:23:13 CEST 2006

Hi All,

Is it possible to replace the print statement with one of mine function ?
Is it any extra reason why print isn't similar to the functions I can make 
with def ?

>>> def olle(dummy): print 'olle:', dummy
>>> def olla(dummy): print 'olla:', dummy
>>> olle('Hopp')
olle: Hopp
>>> olla('Hopp')
olla: Hopp
>>> olle = olla
>>> olle('Hopp')
olla: Hopp
>>> print = olle
Traceback (  File "<interactive input>", line 1
    print = olle
SyntaxError: invalid syntax

In reality, I would like to replace the print in my PyCrust app with the 
log.write() function.

janos juhasz

More information about the Tutor mailing list