From 2cde8a04a64d141023caf48b9eae86acc3f6f488 Mon Sep 17 00:00:00 2001 From: Mike Elahi Date: Sun, 13 Aug 2023 18:31:05 +0200 Subject: [PATCH] Update docs to reflect attribute affecting both serializing and deserializing --- src/marshmallow/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index d258b977a..9c2c50c8c 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -87,7 +87,7 @@ class Field(FieldABC): :param data_key: The name of the dict key in the external representation, i.e. the input of `load` and the output of `dump`. If `None`, the key will match the name of the field. - :param attribute: The name of the attribute to get the value from when serializing. + :param attribute: The name of the attribute to get the value from when (de)serializing. If `None`, assumes the attribute has the same name as the field. Note: This should only be used for very specific use cases such as outputting multiple fields for a single attribute. In most cases,