On Jul 9, 2005, at 11:17, Don Parris wrote:

get_Name(prt_Name)
# Calling get_Name with prt_Name as the argument produces this:

C:\Python24>python scripts\learning.py
f
<function prt_Name at 0x00AEBEF0>

At least it found the function.  That's little shy of a miracle for
me. :)  However, I would like to see 'foo' printed out, since it is
the result of the function.  How can I correct this?

    You have to call the function:
get_Name(prt_Name())

prt_Name is the function itself. prt_Name() (note the parens) calls (executes) the function and allows you to use its return value.

-- Max
maxnoel_fr at yahoo dot fr -- ICQ #85274019
"Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal machine?"


        

        
                
___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to