ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-tutor
python-tutor
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved