On Thu, Aug 1, 2013 at 10:44 AM, Loic Bistuer wrote:
> On Aug 1, 2013, at 4:05 PM, Tom Evans wrote:
>
>> qs = ...
>> print len(qs)
>> print qs[0]
>> print qs[-1]
>> print qs[0]
>>
>> How many queries for this?
>
> Just one and "qs[-1]" will return the last element of the cached result.
>
> I'm no
On Aug 1, 2013, at 4:05 PM, Tom Evans wrote:
> qs = ...
> print len(qs)
> print qs[0]
> print qs[-1]
> print qs[0]
>
> How many queries for this?
Just one and "qs[-1]" will return the last element of the cached result.
I'm not trying to be pedantic, I'm just pointing out that a queryset become
On Wed, Jul 31, 2013 at 7:39 PM, Loic Bistuer wrote:
> In your example "print qs[0]" evaluates a *clone* of "qs", not "qs" itself.
>
> Therefore "qs[0]; qs[-1]; qs[0]" triggers 3 queries, just like "qs[0]; qs[0];
> qs[0]" would.
>
Fine, be pedantic:
qs = ...
print len(qs)
print qs[0]
print qs[0
Hi Matt,
On Thursday, August 1, 2013 12:08:23 AM UTC+2, Matt McClure wrote:
>
> Is the ultimate upstream the CPython repository now? Or a separate
> unittest2 repository?
For Python >= 2.7 it should be CPython; for everything below the separate
unittest2 repository.
--
You received this mes