| Parameters | request | A request object which will be passed to IRenderable.render. | 
 | root | An object to be made flatter.  This may be of type unicode, str, slot, Tag, tuple, list, types.GeneratorType, Deferred, or an object that implements IRenderable. | 
 | write | A callable which will be invoked with each bytes produced by flattening root. | 
 | slotData | A list of dict mapping str slot names to data with which those slots will be replaced. | 
 | renderFactory | If not None, an object that provides IRenderable. | 
 | dataEscaper | A 1-argument callable which takes bytes or unicode and returns bytes, quoted as appropriate for the rendering context.  This is really only one of two values: attributeEscapingDoneOutside or escapeForContent, depending on whether the rendering context is within an attribute or not.  See the explanation in writeWithAttributeEscaping. | 
| Returns | An iterator that eventually yields bytes that should be written to the output.  However it may also yield other iterators or Deferreds; if it yields another iterator, the caller will iterate it; if it yields a Deferred, the result of that Deferred will either be bytes, in which case it's written, or another generator, in which case it is iterated.  See _flattenTree for the trampoline that consumes said values. (type: An iterator which yields bytes, Deferred, and more iterators of the same type.) |