Here's the code, modified to only build the mapping using itervalues
vs. values:

http://kmdaily.pastebin.com/d68b408af

Here's the printed output that I get when running it. The lengths
shown match the size of the tables in the DB:

Length of clusters: 176574
Length of events: 247912
With itervalues, number of events seen: = 17407
Length of mapping: 12319
With values, number of events seen: = 247911
Length of mapping: 176573

Another thing to note is that the number of events processed with
itervalues is not always the number shown - the output has also been
~9000 and ~11000.

Kenny

On Jun 14, 3:59 pm, Christopher Lee <l...@chem.ucla.edu> wrote:
> On Jun 14, 2009, at 11:52 AM, Kenny Daily wrote:
>
>
>
> > Not quite - casting to a list with values() and itervalues() gives the
> > expected number. But, when run in the code in context of building the
> > mapping (even with the suggestion to change the mode to 'nr') looping
> > with itervalues() doesn't make it all the way through. I'll be out
> > this morning/afternoon, but this evening I'll work up a more detailed
> > example...getting the data will be difficult, because first it's not
> > my data, and second its in a mysql database. Thanks again!
>
> Yes, at this point we need to see the detailed code you're using.  It  
> seems pretty mysterious.  I have just tested SQLTable.iteritems() vs.  
> items() from a MySQL table with about 74000 rows and could not  
> reproduce the problem you're describing.  Maybe it depends on your  
> actual row sizes or something.
>
> -- Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pygr-dev" group.
To post to this group, send email to pygr-dev@googlegroups.com
To unsubscribe from this group, send email to 
pygr-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pygr-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to