Paul Johnston schrieb:
> Hi,
> 
>     slightly concerned to see that it does an isinstance(vardata,list)
>     rather than hasattr(vardata,'__len__') before calling len(vardata) to
> 
> 
> This is probably because calling len on database result sets could 
> result in an expensive COUNT(*) query, that you don't want paginate 
> causing unnecessarily.
> 
> So, by all means propose a patch, but bear in mind this requirement.


The code needs the length of the overall result, how else are you going 
to calculate the number of total pages? And the SO/SA result objects 
should cretainly cache that value once it is computed by the DB - if 
not, their broken.

so I don't see any problems here.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to turbogears@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to