No title Revision 313533303134 (Tue Oct 19 2010 at 08:34) - Diff Link to this snippet: https://friendpaste.com/34SqUc2zfk2Pk9Ysvb6BRI Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 12345678910111213141516171819202122232425262728293031323334353637383940In [29]: from pymongo.dbref import DBRefIn [30]: a = {'foo': DBRef(collection='bla', database='bar', id='goo')}In [35]: deepcopy(a)---------------------------------------------------------------------------KeyError Traceback (most recent call last)/home/namlook/Documents/projets/mongokit-hg/mongokit/<ipython console> in <module>()/usr/lib/python2.6/copy.pyc in deepcopy(x, memo, _nil) 160 copier = _deepcopy_dispatch.get(cls) 161 if copier:--> 162 y = copier(x, memo) 163 else: 164 try:/usr/lib/python2.6/copy.pyc in _deepcopy_dict(x, memo) 253 memo[id(x)] = y 254 for key, value in x.iteritems():--> 255 y[deepcopy(key, memo)] = deepcopy(value, memo) 256 return y 257 d[dict] = _deepcopy_dict/usr/lib/python2.6/copy.pyc in deepcopy(x, memo, _nil) 169 y = _deepcopy_atomic(x, memo) 170 else:--> 171 copier = getattr(x, "__deepcopy__", None) 172 if copier: 173 y = copier(memo)/usr/local/lib/python2.6/dist-packages/pymongo-1.9-py2.6-linux-i686.egg/bson/dbref.pyc in __getattr__(self, key) 79 80 def __getattr__(self, key):---> 81 return self.__kwargs[key] 82 83 def as_doc(self):KeyError: '__deepcopy__'