Skip to content Skip to sidebar Skip to footer
Showing posts with the label Python Dataclasses

How To Make Non-frozen Dataclass Frozen, And Vice Versa?

I want to know any simple way to make the below dataclass bar frozen. @dataclass class Bar: foo… Read more How To Make Non-frozen Dataclass Frozen, And Vice Versa?

Nested Python Dataclasses With List Annotations

python ^3.7. Trying to create nested dataclasses to work with complex json response. I managed to d… Read more Nested Python Dataclasses With List Annotations

Type Hint For An Instance Of A Non Specific Dataclass

I have a function that accepts an instance of any dataclass. what would be an appropriate type hint… Read more Type Hint For An Instance Of A Non Specific Dataclass