diff --git a/dataclasses_json/core.py b/dataclasses_json/core.py index a67e9beb..3c0c9fe3 100644 --- a/dataclasses_json/core.py +++ b/dataclasses_json/core.py @@ -393,7 +393,7 @@ def handle_pep0673(pre_0673_hint: str) -> Union[Type, str]: if len(type_args) == len(xs): return list(_decode_item(type_arg, xs[type_ix]) for type_ix, type_arg in enumerate(type_args)) if len(type_args) == 1: - return list(_decode_item(type_arg, x) for type_arg, x in zip(type_args, xs)) + return list(_decode_item(type_arg, x) for type_arg, x in product(type_args, xs)) else: raise TypeError(f"Number of types specified in collection type {str(type_args)} is greater than one and does not match number of elements in the collection. Please review the type hint for this field.") return list(_decode_item(type_args, x) for x in xs)