On Mar 5, 11:22 am, [EMAIL PROTECTED] wrote:
> messagesReceived = dict.fromkeys(("one","two"), {})

This creates two references to just *one* instance of empty
dictionary.
I'd do it like:
messagesReceived = dict([(key, {}) for key in ("one","two")])




-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to