Paul Rubin wrote:
> Stef Mientki <[EMAIL PROTECTED]> writes:
>>>     for net in Nets.keys():
>>>     # Nets.iterkeys() would avoid building the list
>>>     # but that runs the same risks as your original
>>>         if net.upper() in  in Eagle_Power_Nets :
>>>             del Nets[net]
>>>
>> thanks Steve,
>> that does the job.
> 
> Depending on the relative sizes of those dicts, maybe
> you want to try rebuilding instead of deleting.  Untested:
> 
>     Nets = dict((k,v) for k,v in Nets.itervalues() 
>                       if k.upper() not in Eagle_Power_Nets)

thanks Paul,

this is a very interesting idea,
especially while my dictionaries are quit small,
and I have to do some more complex things other than delete.

cheers,
Stef Mientki
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to