Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, vavasis
Date 2011-09-19.06:24:20
SpamBayes Score 0.0352313
Marked as misclassified No
Message-id <1316413462.19.0.541030796368.issue13006@psf.upfronthosting.co.za>
In-reply-to
Content
This is a bug in the script; the code is similar to the following::

  >>> funclist = []
  >>> global_list = []
  >>> funclist.append(global_list)
  >>> global_list.append(1)
  >>> funclist.append(global_list)
  >>> print funclist
  [[1], [1]]

i.e the same object is added twice to "funclist", any modification to the first item is a modification to the second. See also http://www.python.org/doc//current/faq/programming.html#how-do-i-create-a-multidimensional-list
In your script, it's certainly happens because there are multiple nested blocks ('{' '}') in the same function ('$FUNC'), so global_list is still the *same* list.
History
Date User Action Args
2011-09-19 06:24:22amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, vavasis
2011-09-19 06:24:22amaury.forgeotdarcsetmessageid: <1316413462.19.0.541030796368.issue13006@psf.upfronthosting.co.za>
2011-09-19 06:24:21amaury.forgeotdarclinkissue13006 messages
2011-09-19 06:24:20amaury.forgeotdarccreate