marshmallow
marshmallow copied to clipboard
allow for overriding dump’s iteration behavior
Currently at: https://github.com/marshmallow-code/marshmallow/blob/1781e9a18895aa9b473fb5587de3cf922416733e/marshmallow/schema.py#L396-L397 iteration behavior is determined by list(). Would it be considered a useful feature to be able to override this behavior with a function that takes the object and returns an iterator? (similar to the way _serializer can be overriden)
def _dumper(obj):
return (i for i in obj)