[Tutor] about the function
kent_johnson at skillsoft.com
Mon Oct 25 05:27:08 CEST 2004
If I understand your question, it sounds like maybe pic should be a class.
Then it would keep its position in instance variable and draw itself. Your
code would be
Otherwise setposition(position, pic) could modify pic in some way so that
draw(pic) knows where to draw it. Or you could pass the position to draw:
More detail about pic would help.
At 06:58 AM 10/25/2004 +0800, Lin Jin wrote:
>i am new in python.just learn how to defining the function.i want to know
>that if i define three functions.how can i use read the data from one
>function to the other funtion.it;s like if i have function
>draw(pic),setposition(position,pic).if i want to used the data in
>setposition for the draw.how i could do that.
>Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn/
>Tutor maillist - Tutor at python.org
More information about the Tutor