marshmallow-code / marshmallow-code/marshmallow

Implement a field.Set?

Open
#1,549 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.2k
Forks
738
Avg merge
1d 23h
Merged PRs (30d)
7

Description

I was curious why Marshmallow didn't have a `field.Set` for Python sets.

I would imagine the code would be mirror identical to `List` (https://github.com/marshmallow-code/marshmallow/blob/dev/src/marshmallow/fields.py#L656) only with a `list` being serialized into a `set`, and deserialized back into a `list`.

Would this be easy to implement? Any pitfalls I should be made aware of?

Contributor guide

Open the contributing guide

Research direction

Start in src/marshmallow/fields.py around the existing List field referenced in the issue and compare its serialization and deserialization behavior. Clarify the intended set/list conversion, then add the Set field and verify that its behavior matches the agreed semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.