Message144262
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. |
|
Date |
User |
Action |
Args |
2011-09-19 06:24:22 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, vavasis |
2011-09-19 06:24:22 | amaury.forgeotdarc | set | messageid: <1316413462.19.0.541030796368.issue13006@psf.upfronthosting.co.za> |
2011-09-19 06:24:21 | amaury.forgeotdarc | link | issue13006 messages |
2011-09-19 06:24:20 | amaury.forgeotdarc | create | |
|