Message 73723 - Python tracker
Message73723
| Author | amaury.forgeotdarc |
|---|---|
| Recipients | amaury.forgeotdarc, dominik.holler |
| Date | 2008-09-24.15:58:26 |
| SpamBayes Score | 0.01783897 |
| Marked as misclassified | No |
| Message-id | <1222271907.75.0.631265896588.issue3958@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-09-24 15:58:27 | amaury.forgeotdarc | set | recipients: + amaury.forgeotdarc, dominik.holler |
| 2008-09-24 15:58:27 | amaury.forgeotdarc | set | messageid: <1222271907.75.0.631265896588.issue3958@psf.upfronthosting.co.za> |
| 2008-09-24 15:58:27 | amaury.forgeotdarc | link | issue3958 messages |
| 2008-09-24 15:58:27 | amaury.forgeotdarc | create | |