Re: cProfile, timed call tree

2018-05-28 Thread Nico Schlömer
Thanks, Dieter, for the concise answer. Cheers, Nico On Sat, May 26, 2018 at 7:42 AM dieter wrote: > Nico Schlömer writes: > > > From what I understand about the Python profilers, the type of > information > > you get from a stats object is > > > > * How

cProfile, timed call tree

2018-05-25 Thread Nico Schlömer
Hi everyone, >From what I understand about the Python profilers, the type of information you get from a stats object is * How much time was spent in function X, * what the callers and callees of function X are, and * and bunch of meta info about function X. With the program ``` def prime(n

Re: itertools: problem with nested groupby, list()

2010-05-04 Thread Nico Schlömer
7;New A', a", so I can't just skip this. Anyway, the above suggestion works well for now. Thanks! --Nico On Tue, May 4, 2010 at 1:52 PM, Jon Clements wrote: > On 4 May, 12:36, Nico Schlömer wrote: >> > Does this example help at all? >> >> Thanks, that

Re: itertools: problem with nested groupby, list()

2010-05-04 Thread Nico Schlömer
in that case. > which is a no-no. Create a custom iterator function (IIRC they are > called "generators") and you should be fine. I'll look into this, thanks for the hint. Cheers, Nico On Tue, May 4, 2010 at 12:46 PM, Ulrich Eckhardt wrote: > Nico Schlömer wrote: >&g

Re: itertools: problem with nested groupby, list()

2010-05-04 Thread Nico Schlömer
tter('b')) ) for pass in ['first pass', 'second pass']: for b, b_iter in inner_list: print '\t', 'New B', b for b_data in b_iter: print '\t'*3, a, b, b_data print '\t', 'End

itertools: problem with nested groupby, list()

2010-05-04 Thread Nico Schlömer
Hi, I ran into a bit of an unexpected issue here with itertools, and I need to say that I discovered itertools only recently, so maybe my way of approaching the problem is "not what I want to do". Anyway, the problem is the following: I have a list of dictionaries, something like [ { "a": 1, "b"