1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-25 04:43:51 +00:00

add docstring to PythonItemExporter

This commit is contained in:
Pablo Hoffman 2013-08-14 02:48:10 -03:00
parent c0b26e3d49
commit 49952a45ae

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)