You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
copy.deepcopy barfs when copying a class derived from dict #41420
bpo-1100562: deepcopying listlike and dictlike objects
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:
assignee=Noneclosed_at=<Date2008-01-20.19:30:38.381>created_at=<Date2005-01-10.21:28:19.000>labels= ['library']
title='copy.deepcopy barfs when copying a class derived from dict'updated_at=<Date2008-01-20.19:30:38.380>user='https://bugs.python.org/winjer'
When I copy.deepcopy one of these it blows up in
__setitem__ with an AttributeError on _keys, because
__setitem__ is called without __init__ ever having been
called. Presumably this thing looks and smells like a
dictionary, so deepcopy thinks it is one.
Activity
winjer commentedon Jan 10, 2005
I've got a class:
...
When I copy.deepcopy one of these it blows up in
__setitem__ with an AttributeError on _keys, because
__setitem__ is called without __init__ ever having been
called. Presumably this thing looks and smells like a
dictionary, so deepcopy thinks it is one.
sonderblade commentedon Jan 15, 2005
Logged In: YES
user_id=51702
See patch 1100562