Delete common entries between two dictionaries

Aahz aahz at pythoncraft.com
Tue Nov 25 11:51:46 EST 2003


In article <7xn0alwcfr.fsf at ruckus.brouhaha.com>,
Paul Rubin  <http://phr.cx@NOSPAM.invalid> wrote:
>aahz at pythoncraft.com (Aahz) writes:
>>Paul Rubin:
>>>
>>>for k in domains_white():
>>>   if k in domains_black:
>>>      del domains_black[k]
>> 
>> Didja try that before posting?....  (I see at least two errors.)
>
>Oops, editing error (I removed 'keys' which is no longer needed, but
>forgot to remove the parentheses).  No I didn't try it first.
>What's the second error?

Try it and find out!  ;-)
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote 
programs, then the first woodpecker that came along would destroy civilization.




More information about the Python-list mailing list