How To Use: "@dataclass" In Python (Tutorial 2023)

How To Use: "@dataclass" In Python (Tutorial 2023)

Indently

1 год назад

26,208 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

virusSOS
virusSOS - 08.11.2023 05:27

What editor did you use for Python?

Ответить
thepackbot
thepackbot - 27.10.2023 04:49

That tidbit about "variables with default values must come after the ones without them", just explained a big problem I was having. Thank you!

Ответить
enrico roselino
enrico roselino - 22.10.2023 19:46

bob job nice

Ответить
Noido Dev
Noido Dev - 20.10.2023 08:00

Is it better to use that for data or some dict? For example, It seem that I won't be able to get "keywords".

Also, there's a difference between _slots_ and slots=True, which is that you can use default value with the new method.

Ответить
KI Band Honor Music
KI Band Honor Music - 24.08.2023 23:41

'banana.calories = 69, i mean, 60' 😂

Ответить
Dr Gamma D
Dr Gamma D - 31.07.2023 18:55

Don't forget the dataclasses.Field object...can be very useful when dealing with telemetry.
There's also the "astuple" method that is attached to the class.

Ответить
Sanwicklith Mkalinga
Sanwicklith Mkalinga - 12.07.2023 08:25

Do u have a course… or mentoring program

Ответить
Forethio
Forethio - 25.04.2023 09:34

Young, energetic python developer

Ответить
Comrade Cat
Comrade Cat - 24.02.2023 14:43

Why are you teaching people how to use me?

Ответить
Arti Losco
Arti Losco - 21.02.2023 09:24

Cool. Thanks!

Ответить
Veli Cihan ATEŞ
Veli Cihan ATEŞ - 18.02.2023 11:44

You could have used two asterix operators to insert json in your person class
'bob = Person(**json)'

Ответить
Kyrylo Murashev
Kyrylo Murashev - 18.02.2023 11:11

Nice! Named tuple vs dataclass for the next video?

Ответить
betapacket
betapacket - 18.02.2023 05:24

5th

Ответить
LostSoul86
LostSoul86 - 17.02.2023 21:02

I'm learning python... bob= Person(**json) is better?

Ответить
David L
David L - 17.02.2023 20:55

Thank you. Very clear like your udemy couse ;)

Ответить
꧁Kickaricka3꧂
꧁Kickaricka3꧂ - 17.02.2023 20:02

Thank you :>

Ответить