Any problems with *lots* of attributes?
Aahz
aahz at pythoncraft.com
Thu Feb 5 08:46:04 EST 2004
In article <1024d7q40b86r2a at news.supernews.com>,
John Roth <newsgroups at jhrothjr.com> wrote:
>
>I believe the memory overhead for dictionaries is 4 times that for
>lists on a per item basis, however both data structures allocate
>extra space so that they don't have to reallocate too frequently
>(a very expensive operation.)
Should be only double; where do you get four times? (Note that I'm
talking strictly about the dict itself, not the space consumed by the
keys.)
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code --
not in reams of trivial code that bores the reader to death." --GvR
More information about the Python-list
mailing list