StackOverflow Questions for Tag: python-dataclasses

Hernan
Hernan

Reputation: 6063

Avoid explicit `default` keyword in Python's dataclass field

Score: 2

Views: 78

Answers: 1

Read More
JoniKauf
JoniKauf

Reputation: 25

Python dictionary vs dataclass (and metaclasses) for dynamic attributes

Score: 0

Views: 35

Answers: 1

Read More
Tom Pohl
Tom Pohl

Reputation: 3104

Easiest way to copy all fields from one dataclass instance to another?

Score: 90

Views: 70708

Answers: 6

Read More
Adin D
Adin D

Reputation: 693

What is a better way to iterate over dataclass keys and values?

Score: 55

Views: 59792

Answers: 6

Read More
roschach
roschach

Reputation: 9396

Python get_type_hints not returning parent's annotations of child dataclass

Score: 1

Views: 44

Answers: 1

Read More
alex_halford
alex_halford

Reputation: 439

Python frozen dataclass, allow changing of attribute via method

Score: 10

Views: 15534

Answers: 3

Read More
Codoscope
Codoscope

Reputation: 944

Call the generated __init__ from custom constructor in dataclass for defaults

Score: 7

Views: 2323

Answers: 2

Read More
kingJulian
kingJulian

Reputation: 6180

What are data classes and how are they different from common classes?

Score: 493

Views: 273602

Answers: 5

Read More
rdong8
rdong8

Reputation: 33

Python @dataclasses(slots=True) breaks super()

Score: 1

Views: 48

Answers: 1

Read More
PavelDev
PavelDev

Reputation: 683

How to make my dataclass compatible with ctypes and not lose the “dunder“ methods?

Score: 1

Views: 64

Answers: 2

Read More
Akin Wilson
Akin Wilson

Reputation: 47

How to 'pythonically' merging python data classes with unique attribute names

Score: 0

Views: 82

Answers: 2

Read More
Adam Boinet
Adam Boinet

Reputation: 531

Counter-intuitive results when mixing dataclass and enum

Score: 2

Views: 558

Answers: 2

Read More
sji gshan
sji gshan

Reputation: 341

How to parse a JSON object into a python dataclass without third party library?

Score: 21

Views: 31967

Answers: 4

Read More
Mysterio
Mysterio

Reputation: 3467

Class inheritance in Python 3.7 dataclasses

Score: 333

Views: 234392

Answers: 17

Read More
miracle2k
miracle2k

Reputation: 32087

Make the Python json encoder support Python's new dataclasses

Score: 207

Views: 220233

Answers: 14

Read More
kerzane
kerzane

Reputation: 465

Python dataclasses: omit field from asdict

Score: 16

Views: 9411

Answers: 3

Read More
Simon1
Simon1

Reputation: 734

Converting YAML file to dataclass with nested dataclasses and optional keyword arguments

Score: 3

Views: 2353

Answers: 4

Read More
johnson
johnson

Reputation: 4425

Force type conversion in python dataclass __init__ method

Score: 72

Views: 41823

Answers: 11

Read More
Back2Basics
Back2Basics

Reputation: 7806

python dataclasses with optional attributes

Score: 62

Views: 95387

Answers: 4

Read More
CoderGuyy
CoderGuyy

Reputation: 147

Initializing python dataclass object without passing instance variables or default values

Score: 6

Views: 9756

Answers: 2

Read More
PreviousPage 1Next