BPO | [3958](https://bugs.python.org/issue3958) --- | :--- Nosy | @amauryfa Files | [test.py](https://bugs.python.org/file11593/test.py "Uploaded as text/plain at 2008-09-24.15:17:22 by dominik.holler")[index.html](https://bugs.python.org/file11594/index.html "Uploaded as text/plain at 2008-09-24.15:17:41 by dominik.holler") *Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.* Show more details GitHub fields: ```python assignee = None closed_at = created_at = labels = ['invalid'] title = 'strage default value behaviour' updated_at = user = 'https://bugs.python.org/dominikholler' ``` bugs.python.org fields: ```python activity = actor = 'dominik.holler' assignee = 'none' closed = True closed_date = closer = 'amaury.forgeotdarc' components = ['None'] creation = creator = 'dominik.holler' dependencies = [] files = ['11593', '11594'] hgrepos = [] issue_num = 3958 keywords = [] message_count = 3.0 messages = ['73718', '73723', '73745'] nosy_count = 2.0 nosy_names = ['amaury.forgeotdarc', 'dominik.holler'] pr_nums = [] priority = 'normal' resolution = 'not a bug' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue3958' versions = ['Python 2.5', 'Python 2.4'] ```
Activity
dominikholler commentedon Sep 24, 2008
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
amauryfa commentedon Sep 24, 2008
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:
to have a less surprising behavior.
dominikholler commentedon Sep 24, 2008
thx
sorry reporting this bug