weakref, memory management and execution slow down in PyQt4

Michael Torrie torriem at gmail.com
Tue Sep 9 17:34:46 CEST 2014


On 09/08/2014 08:45 PM, kjs wrote:
> You're right, a dictionary can do everything I need and more.

Actually I am wrong in suggesting a dictionary.  A list or an array
would probably be more appropriate.

Thinking about it this morning, one additional reason why getattr and
setattr aren't appropriate for this task is that they are not just a
dictionary lookup under the hood, they are an additional layer.  One
more function call that would be unnecessary if you used a data
structure directly.




More information about the Python-list mailing list