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
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to