add docstring to PythonItemExporter

This commit is contained in:
Pablo Hoffman 2013-08-14 02:48:10 -03:00
parent c0b26e3d49
commit 49952a45ae
1 changed files with 5 additions and 0 deletions

View File

@ -211,6 +211,11 @@ class PprintItemExporter(BaseItemExporter):
self.file.write(pprint.pformat(itemdict) + '\n')
class PythonItemExporter(BaseItemExporter):
"""The idea behind this exporter is to have a mechanism to serialize items
to built-in python types so any serialization library (like
json, msgpack, binc, etc) can be used on top of it. Its main goal is to
seamless support what BaseItemExporter does plus nested items.
"""
def serialize_field(self, field, name, value):
serializer = field.get('serializer', self._serialize_value)