passing by refference

Daan Hoogland hoogland at astron.nl
Tue May 13 10:00:07 EDT 2003


is passing by reffence possible in python?

I'd like the following code to print 
1
instead of
2

<file name="D.py">
def spam(**ni):
  ni["egg"] = 1;

bacon = 2
spam(egg = bacon)
print bacon
</file>

the actual construct is going to return several newly created object, to give a
reason why.





More information about the Python-list mailing list