Function serialize
Synopsis
def serialize(node, stream=None, Dumper=Dumper, **kwds)
Description
Serialize a representation tree into a YAML stream. If stream is None, return the produced string instead.
Mentioned in
- Documentation / Nodes
Source
Lines 245-251 in lib3/yaml/__init__.py.
def serialize(node, stream=None, Dumper=Dumper, **kwds):
"""
Serialize a representation tree into a YAML stream.
If stream is None, return the produced string instead.
"""
return serialize_all([node], stream, Dumper=Dumper, **kwds)