Greetings Alchemists, I really like the transparent slicing of Query object but there seems to be a bug some with empty slices. First or all, fire up your favorite Python shell and convince yourself that all or those return empty lists:
range(10)[:0] range(10)[0:0] range(10)[1:1] Now, if you were to apply the same slices to a query object, you would be shocked as you notice that only the last returns an empty list; the fist two return the whole database. I looked in orm.Query.__getitem__ and the handling of slices seems to be correct. As and example, both q[:0]._limit and q[1:1]._limit return 0. My guess is that the underlying Select object does not take limit into account when offset is 0. You will all agree that this is a bug and that it needs to be fixed. I don't mind digging into the sources to fix it. Can anyone point me in the right direction? -- Yannick Gingras --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---