On Sat, Jun 13, 2009 at 07:28:14PM -0700, Kenny Daily wrote: -> They are equal! itervalues gives me back the expected number of -> records...I tried running my loop isolated from other code, and I -> still get the discrepancy though... -> -> Kenny -> -> On Jun 13, 6:03?pm, "C. Titus Brown" <c...@msu.edu> wrote: -> > On Sat, Jun 13, 2009 at 06:00:05PM -0700, Kenny Daily wrote: -> > -> > -> Another unrelated question - when iterating over an AnnotationDB, I -> > -> get very different results when calling annotdb.values() versus -> > -> annotdb.itervalues(). There are approximately 170000 records in the -> > -> table. In the code above, when I do the for loop with itervalues() it -> > -> only loops somewhere between 7000-10000! -> > -> -> > -> We are using a MySql backend to store the AnnotationDB. -> > -> > Hi Kenny, -> > -> > that's worrisome ;) -> > -> > Could you confirm for me that -> > -> > ? ? ? ? len(list(annotdb.sliceDB.iteritems())) -> > -> > and -> > -> > ? ? ? ? len(annotdb.sliceDB.items()) -> > -> > give the same discrepancy in # of results?
OK, that's downright freaky... something very weird is going on; if you look at the implementation of values and itervalues in the AnnotationDB class, they just call sliceDB.items and sliceDB.iteritems. Erm, I haven't been following the discussion; can you make your code + dataset available for us to grab & try out? thanks, --t -- C. Titus Brown, c...@msu.edu --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---