Problem with assigning variables of type List
fredrik at pythonware.com
Wed Aug 21 17:17:17 CEST 2002
Paul Foley wrote:
> Fine, let's see what FOLDOC has to say, shall we? :-
did you look "reference" up in foldoc?
> (CBV) An evaluation strategy where arguments are evaluated before
> the function or procedure is entered. 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. See applicative order reduction, call-by-value-result,
> strict evaluation, call-by-name, lazy evaluation.
> So: arguments are evaluated before the function or procedure is
> entered? Yup, Python does that. Only the values are passed, and
> changes to the arguments within the called procedure have no effect on
> the actual arguments as seen by the caller?
perhaps if you're using your own, very precise and extremely narrow
definitions of words like "value", "argument", "change", "procedure" etc.
but in the real world, it's more like this:
# try to change my argument
sentence[3:] = ["big", "fucking", "idiot"]
description = ["paul", "foley", "is", "a", "genius"]
for word in description: print word,
> Wrong again.
do you have any evidence that your I-have-a-big-stick-up-my-ass
approach has ever helped you explain anything to anyone?
More information about the Python-list