--
Ticket URL: <https://code.djangoproject.com/ticket/32326>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => wontfix
Comment:
Thanks for this proposition, however the current example is sufficient for
Django documentation, IMO.
--
Ticket URL: <https://code.djangoproject.com/ticket/32326#comment:1>
Comment (by niauah):
Replying to [comment:1 Mariusz Felisiak]:
> Thanks for this proposition, however the current example is sufficient
for Django documentation, IMO. We already have an extensive docs and we
cannot document each use case and non-Django caveats.
Thanks for the reply. I understand that the document cannot cover detailed
non-Django caveats (e.g. issues on Python methods). If necessary, I can
revise the patch and delete them.
However, in the original example:
{{{
rows = (["Row {}".format(idx), str(idx)] for idx in range(65536))
pseudo_buffer = Echo()
writer = csv.writer(pseudo_buffer)
response = StreamingHttpResponse((writer.writerow(row) for row in
rows),
content_type="text/csv")
}}}
the 65536-row list is fully traversed at declaration, not in a 'call-by-
need' fashion.
IMO, providing an example combined with yield method would be more
illustrative of the 'streaming' nature.
--
Ticket URL: <https://code.djangoproject.com/ticket/32326#comment:2>
* cc: niauah (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/32326#comment:3>