On 3/2/06, Ben Vinger <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> I want myfunction in the pseudocode below return something different if it
> was called from indexfunction.
>

How about adding a parameter to myfunction itself:

def indexfunction():
     blah
     myfunction(fromindexfunction=True)

def myfunction(fromindexfunction=False):
    x = 'whatever'
    if fromindexfunction:
       return x
    else:
       return <header> + x + <footer>

André
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to