On Mar 8, 5:49 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> __len__() is called first before
> __iter__() and has the effect of two SQL statements being issued.

Actually it seems to be the other way around, but nonetheless two
queries are executed.
Unfortunately I don't even see a reliable way to find out if __len__
was called directly after __iter__.
If that could be detected the result length could possibly be cached
by __iter__ and __len__ could use the cached result without executing
a useless query.
Pity.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to