it doesn't work ;) [class recursive function]
python at mrabarnett.plus.com
Thu Sep 16 02:01:40 CEST 2010
On 16/09/2010 00:23, Ethan Furman wrote:
> I need some fresh eyes, or better brains, or both!
> The expected debugging output is a list of names in alphabetical order
> from each node (there are about 90 of them); what I am getting is this:
> --> dbf.tables.Index.from_file('', r'aad13658_last_name_for_state.idx')
> starting next_item call for root
> <open file 'aad13658_last_name_for_state.idx', mode 'rb' at 0x013BD458>
> 512 30
> more nodes
> CARNAHAN 1536
> ENGLUND 1024
> HOLSTEIN 2048
> MATTHEWS 2560
> ROSENFELD 3072
> TERWILLIGER 3584
> YAZZOLINO 4096
> and then it stops. I should get about nine of these sections, and I'm
> only getting one.
> <code snippet>
> </code snippet>
> Any ideas appreciated!
'next_item' is a generator, but it's just calling itself and discarding
the result. I think it should be yielding the results to its caller.
That fix gives me 7 sections in total.
More information about the Python-list