#7430: Recursively iterating through a template's nodes
-------------------------------------+-------------------------------------
Reporter: miracle2k | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* status: closed => new
* resolution: needsinfo =>
* needs_tests: 1 => 0
* stage: Design decision needed => Ready for checkin
Comment:
As per a [https://github.com/django/django/pull/16473 much later report
via a PR], `Template.__iter__()` looks broken:
{{{
>>> from django.template import Template
>>> t = Template('Hello, world!')
>>> next(iter(t))
...
TypeError: 'TextNode' object is not iterable
}}}
> I don't recall whether this was by design. Does any Django code actually
*use* this iter behavior?
According to the test suite, it doesn't.
I think this can just be removed (as per the PR).
--
Ticket URL: <https://code.djangoproject.com/ticket/7430#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018611da084d-6d6bace0-9149-4c73-912e-bc50af333bfd-000000%40eu-central-1.amazonses.com.