[CentralOH] Places.objects.all() Seems to be An Iterator; Then Again, Maybe Not
jep200404 at columbus.rr.com
jep200404 at columbus.rr.com
Mon Jun 4 21:35:39 CEST 2012
On Mon, 4 Jun 2012 12:53:41 -0400, jep200404 at columbus.rr.com wrote:
> On Mon, 4 Jun 2012 11:44:01 -0400, Mr Mark E Erbaugh <mark at microenh.com> wrote:
>
> > Does Places.objects.all() return an iterator or a sequence?
>
> The dox that I've read[1] do not directly say, but suggest that
> .all() returns an iterator. See the Iteration and list() items
> in the list of ways that a QuerySet can be evaluated in the
> dox that I read.
Looking more, it's not clear.
print >>self.stdout, repr(Places.objects.all())
seemed to indicate that foo was a list. Also, that one can append
'.iterator()' suggests that .all() does not by itself return
an iterator.
So Places.objects.all() is looking more like a list
(or more broadly, sequence) now.
More information about the CentralOH
mailing list