[Tutor] Olle-Olla
by János Juhász other posts by this author
Apr 18 2006 6:23AM messages near this date
Re: [Tutor] GUI
|
Re: [Tutor] Olle-Olla
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@[...].org
http://mail.python.org/mailman/listinfo/tutor
Thread:
János Juhász
Kent Johnson
Kent Johnson
Alan Gauld
János Juhász
Danny Yoo
|