Issue3958
Created on 2008-09-24 15:17 by dominik.holler, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test.py | dominik.holler, 2008-09-24 15:17 | |||
| index.html | dominik.holler, 2008-09-24 15:17 | |||
| Messages (3) | |||
|---|---|---|---|
| msg73718 - (view) | Author: (dominik.holler) | Date: 2008-09-24 15:17 | |
The behaviour is changing, if I toogle comment lines 10 + 11. Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 |
|||
| msg73723 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * ![]() |
Date: 2008-09-24 15:58 | |
Your script is subject to the "shared default value" syndrome, explained here: http://www.python.org/doc/faq/general/#why-are-default-values-shared-between-objects As indicated in the FAQ, your function could be rewritten like this: def getElementsByAttrib(self, value, AName="ID-REF", list=None): if list is None: list = [] ... to have a less surprising behavior. |
|||
| msg73745 - (view) | Author: (dominik.holler) | Date: 2008-09-24 18:33 | |
thx sorry reporting this bug |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:39 | admin | set | github: 48208 |
| 2008-09-24 18:33:04 | dominik.holler | set | messages: + msg73745 |
| 2008-09-24 15:58:27 | amaury.forgeotdarc | set | status: open -> closed resolution: not a bug messages: + msg73723 nosy: + amaury.forgeotdarc |
| 2008-09-24 15:17:45 | dominik.holler | set | files: + index.html |
| 2008-09-24 15:17:22 | dominik.holler | create | |
