Dict can't update with dict-like objects
echuck3 at my-deja.com
echuck3 at my-deja.com
Wed Aug 23 23:48:50 EDT 2000
I'm sure this road has been traveled before, but a quick search of the
FAQ and 1.6 rel notes didn't reveal anything, so here we go:
---
from UserDict import UserDict
d1 = {}
d2 = UserDict()
d1.update(d2)
---
This fails because dictionary's update() doesn't want anything that
responds like a dictionary, but a bona fide dictionary.
And, yeah, I'm sure this is for speed, BUT...is there any known
intention of either changing this, or providing an updateObj() that
would be more friendly?
-Chuck
--
http://webware.sourceforge.net
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list