I
Ishwar Rattan
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
(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