Re: [Tutor] Olle-Olla

2006-04-18 Thread János Juhász
Dear All, Thanks your answers about why I can't redifne the print. I just wanted to play with Python dynamic possibilities. I wanted to replace function in a loaded module instead of create an inherited class and using that. It was easier to try it with print. Alan Gauld wrote: > Guido's call.

Re: [Tutor] Olle-Olla

2006-04-18 Thread Kent Johnson
Andre Engels wrote: > 2006/4/18, Kent Johnson <[EMAIL PROTECTED]>: >> János Juhász wrote: >>> Hi All, >>> >>> Is it possible to replace the print statement with one of mine function ? >>> >>> In reality, I would like to replace the print in my PyCrust app with the >>> log.write() function. >> Best:

Re: [Tutor] Olle-Olla

2006-04-18 Thread Alan Gauld
> Is it possible to replace the print statement with one of mine function ? No precisely because the print statement is a statement (or more accurately a command) not a function. But of course you can create your own print *function*, just call it a slightly different name - printit(), or display

Re: [Tutor] Olle-Olla

2006-04-18 Thread Kent Johnson
János Juhász wrote: > Hi All, > > Is it possible to replace the print statement with one of mine function ? > > In reality, I would like to replace the print in my PyCrust app with the > log.write() function. Best: Use a good editor to change your print statements to log.write() Not so good: R

Re: [Tutor] Olle-Olla

2006-04-18 Thread Danny Yoo
> Is it possible to replace the print statement with one of mine function ? Hi Janos, Yes; there are a set of reserved "keywords" that Python does not allow to be rebound as something else. It's a particular consequence of the way Python's language grammar is parsed. You'll want to watch ou