Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge Twisted dont-unroll-5460

Author: exarkun
Reviewer: MostAwesomeDude
Fixes: #5460

Slightly simplify the implementation of serializing tags and such to HTML
by removing several occurrences of manual loop unrolling.  These will be
handled by the serialization trampoline automatically.


git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@33495 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
  • Loading branch information...
commit 003234bf4b953adf15de572991c1d9b1385daadc 1 parent 320c51e
exarkun authored
View
12 twisted/web/_flatten.py
@@ -147,9 +147,7 @@ def _flattenElement(request, root, slotData, renderFactory, inAttribute):
return
if not root.tagName:
- for element in _flattenElement(request, root.children, slotData,
- renderFactory, False):
- yield element
+ yield _flattenElement(request, root.children, slotData, renderFactory, False)
return
yield '<'
@@ -162,15 +160,11 @@ def _flattenElement(request, root, slotData, renderFactory, inAttribute):
if isinstance(k, unicode):
k = k.encode('ascii')
yield ' ' + k + '="'
- for element in _flattenElement(request, v, slotData,
- renderFactory, True):
- yield element
+ yield _flattenElement(request, v, slotData, renderFactory, True)
yield '"'
if root.children or tagName not in voidElements:
yield '>'
- for element in _flattenElement(request, root.children,
- slotData, renderFactory, False):
- yield element
+ yield _flattenElement(request, root.children, slotData, renderFactory, False)
yield '</' + tagName + '>'
else:
yield ' />'
View
0  twisted/web/topfiles/5460.misc
No changes.
Please sign in to comment.
Something went wrong with that request. Please try again.