A question??

Ishwar Rattan rattan at cps.cmich.edu
Thu Aug 26 01:38:06 EDT 2004


I thought that Python has no concept of reference/pointer
(probably incorrect assumption). I saw the following piece of code:

...
def run(program, *args):
    pid = os.fork()
    if not pid:
         os.execvp(program, (program,)+args)
...

and call to run as

run("pyhton", "a.py")

What is the interpretation of *args (in def run(..)?
Looks like a reference to me, so, how does one decide when to use
a reference or not?

Any pointers to info will be appreciated.
-ishwar



More information about the Python-list mailing list