format

Infoset serialization format styles.

This modules provides methods assisting the serialization module in formatting the text content of serialized infosets.

The methods for "educating" and "stupefying" typographic characters have been inspired by John Gruber's "SmartyPants" project (http://daringfireball.net/projects/smartypants/, see also http://web.chad.org/projects/smartypants.py/).


Attributes

a output_formats

{'compact': Format(simple_whitespace=True),
 'compact+named': Format(entity_map=True, simple_whitespace=True),
 'compact+named+nice': Format(educate=True, entity_map=True, simple_whitespace=True),
 'compact+nice': Format(educate=True, simple_whitespace=True),
 'default': Format(simple_newlines=True),
 'named': Format(entity_map=True, simple_newlines=True),
 'newlines': Format(indent='', simple_whitespace=True),
 'newlines+named': Format(entity_map=True, indent='', simple_whitespace=True),
 'newlines+named+nice': Format(educate=True, indent='', simple_whitespace=True),
 'newlines+nice': Format(educate=True, indent='', simple_whitespace=True),
 'nice': Format(educate=True, simple_newlines=True),
 'nice+named': Format(educate=True, entity_map=True, simple_newlines=True),
 'pretty': Format(indent=True, simple_whitespace=True),
 'pretty+named': Format(entity_map=True, indent=True, simple_whitespace=True),
 'pretty+named+nice': Format(educate=True, entity_map=True, indent=True, simple_whitespace=True),
 'pretty+nice': Format(educate=True, indent=True, simple_whitespace=True),
 'straight': Format(),
 'ugly': Format(simple_newlines=True, stupefy=True),
 'wrap': Format(indent='', wrap=True),
 'wrap+named': Format(entity_map=True, indent='', wrap=True),
 'wrap+named+nice': Format(educate=True, entity_map=True, indent='', wrap=True),
 'wrap+nice': Format(educate=True, indent='', wrap=True)}

Classes

C Format(...) ...

Formatting details for Serializers.

This class contains 57 members.

See the source for more information.