3 ms·
Good question! Dataclasses were actually pretty easy - Python's introspection tools made them straightforward. The tricky parts were: - Type hints - Mapping _
by orrbenyamini 9mo ago
Good question! Dataclasses were actually pretty easy - Python's introspection tools made them straightforward.
The tricky parts were:
- Type hints - Mapping __init__ params to attributes, especially with complex types
- Preserving types - Keeping tuples as tuples and sets as sets (not just lists)
- Error messages - Tracking paths like obj.address.street through the whole pipeline
I checked out safeserialize, by the way—the focus on preventing arbitrary code execution is a really smart niche.