Embedding Python: estimate size of dict/list

Chris Angelico rosuav at gmail.com
Mon Mar 28 21:11:47 EDT 2011


On Tue, Mar 29, 2011 at 12:03 PM, Jerry Hill <malaclypse2 at gmail.com> wrote:
> On Mon, Mar 28, 2011 at 8:26 PM, Chris Angelico <rosuav at gmail.com> wrote:
>> Based on the docs and http://code.activestate.com/recipes/577504/ I
>> understand that to be non-recursive. I'm guessing then that there
>> isn't a recursive version, and that it's best to recurse myself?
>
> Yes, you're right.  I completely missed that bit when I was looking at
> the documentation.

Okay, thanks for that. I'll roll up a solution using the API directly.

I don't mind writing it, but it feels stupid to do all that and then
suddenly discover that there's an inbuilt method that does it all and
more reliably :)

Chris Angelico



More information about the Python-list mailing list