Problem with assigning variables of type List
Max M
maxm at mxm.dk
Wed Aug 21 03:03:03 EDT 2002
More information about the Python-list mailing list
Wed Aug 21 03:03:03 EDT 2002
- Previous message (by thread): urllib to open url with frames?
- Next message (by thread): Problem with assigning variables of type List
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To use your own quote:
"""
CALL-BY-VALUE:
Only the values of the arguments are passed and changes to the
arguments within the called procedure have no effect on the actual
arguments as seen by the caller.
"""
And the example from Hans Nowak:
"""
>>> def foo(lst):
lst.append(42) <----- Has an effect on the actual arguments
>>> a = [1,2,3]
>>> a
[1, 2, 3]
>>> foo(a)
>>> a
[1, 2, 3, 42]
"""
If you cannot see what is going on, I guess there is no point in further
arguments.
regards Max M
- Previous message (by thread): urllib to open url with frames?
- Next message (by thread): Problem with assigning variables of type List
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list