This Is Why Python Data Classes Are Awesome

Поділитися
Вставка
  • Опубліковано 22 тра 2024
  • Data classes in Python are really powerful and not just for representing structured data. In this video, I show you what you can do with dataclasses as well as new capabilities that have been added in Python 3.10.
    💡 Get the FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide.
    🎓 Courses:
    The Software Designer Mindset: www.arjancodes.com/mindset
    The Software Architect Mindset: Pre-register now! www.arjancodes.com/architect
    Next Level Python: Become a Python Expert: www.arjancodes.com/next-level...
    The 30-Day Design Challenge: www.arjancodes.com/30ddc
    🛒 GEAR & RECOMMENDED BOOKS: kit.co/arjancodes.
    👍 If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel!
    💬 Discord: discord.arjan.codes
    🐦Twitter: / arjancodes
    🌍LinkedIn: / arjancodes
    🕵Facebook: / arjancodes
    👀 Code reviewers:
    - Yoriz
    - Ryan Laursen
    - Sybren A. Stüvel
    - Dale Hagglund
    🎥 Video edited by Mark Bacskai: / bacskaimark
    🔖 Chapters:
    0:00 Intro
    0:49 What are data classes?
    1:37 Explaining the example
    4:00 Dataclasses basics
    5:45 Assigning default values
    8:54 Excluding arguments from the initializer
    9:44 Using post_init to generate extra fields
    11:25 Private/protected members
    11:59 Excluding information from the repr
    12:43 Freezing a dataclass
    14:59 (new in Python 3.10) kw_only
    16:10 (new in Python 3.10) match_args
    17:00 (new in Python 3.10) slots
    21:30 Final thoughts
    #arjancodes #softwaredesign #python
    DISCLAIMER - The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!

КОМЕНТАРІ • 508

  • @ArjanCodes
    @ArjanCodes  7 місяців тому +5

    💡 Get the FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide.

  • @saketh_s
    @saketh_s 4 місяці тому +21

    One thing to note, when you pass data class "frozen=True", instance is immutable.
    So at 13:29 you are actually getting error for search_string which we are trying to change at _post_int_ at object creating not for person name (line 25)
    You can not change fields even inside the class even with setter methods.

  • @sbeau
    @sbeau 2 роки тому +173

    Arjan, your ability to explain detail in a structured, easy to follow format is second to none. Thank you for another great tutorial.

  • @coupmd
    @coupmd 2 роки тому +81

    Enjoyed this video. Would enjoy more videos on intermediate/advanced python standard library tools and their examples of their intended use cases.

  • @wbellmangmail
    @wbellmangmail 2 роки тому +3

    Just came across you channel. I've watched a couple of your other videos as well... I happen to be working on a project and your videos on dependency injection vs. dependency inversion as well as your video on structural pattern matching have been super helpful! Awesome stuff! Thanks for getting content out there (and chapter-izing your videos. ;) )!

  • @hematogen50g
    @hematogen50g 8 місяців тому +10

    I came to Python from C# so I picked up coding quickly. But thinking in python way is harder, so such videos really help me develop python mindset.

  • @FrankenLab
    @FrankenLab Рік тому +1

    @ArjanCodes, great video. I consider myself a casual programmer and have been programming with Python for about 5yrs and absolutely love it. I started programming "casually" in the 80's with C, Pascal, Assembler, then Perl and now Python. I really enjoyed C and Perl, but Python is by far my favorite now. This is the first video I've seen of yours and based on that I just subscribed to your channel. I enjoy your style and explanations and I don't have to play the video at twice the speed waiting for you to get to the point. I'm looking forward to seeing more of your Python videos.

  • @vedambala
    @vedambala Рік тому +14

    Arjan,
    You should seriously consider doing a full fledged Python course from beginner to advance level laden with Projects so we can learn Python the Pythonic way.

  • @jordansilke3629
    @jordansilke3629 2 роки тому +11

    This is truly an excellent successor to your earlier video on data classes, bravo!

    • @ArjanCodes
      @ArjanCodes  2 роки тому +2

      Thanks Jordan, glad you liked it!

  • @bryan_hiebert
    @bryan_hiebert Рік тому +2

    Just like every video from you my knowledge of programming with python is advanced. I really appreciate the content you provide, thank you!

  • @songsft.googleassistant2542
    @songsft.googleassistant2542 2 роки тому +3

    May you have tons of subs Arjan cause you're one of the few youtubers whose python codes aren't messed up and you're instructions are on the point and useful.

  • @ChrisPatti
    @ChrisPatti Рік тому

    I really love this video! It’s an excellent quick, guided tours to how powerful data classes, can be. Thanks for making it!

    • @ArjanCodes
      @ArjanCodes  Рік тому +1

      Thank you Christopher. Glad it was helpful!

  • @neoporcupine
    @neoporcupine Рік тому +2

    Working my way through my third LinkedIn Learning (LIL) Python course, all of which claim to teach you the data structures available. Arjan's short video explains a dozen reasons why you want to use dataclass that the LIL courses didn't include. Thank you!

  • @barrykruyssen
    @barrykruyssen Рік тому

    Hi Arjan. Great video, very well presented. I've just found your channel and will be watching all your videos as time permits. I'm a retired software engineer (started back in the early 80's). 5 weeks ago I decided, in my retirement, to switch back to linux (and python - which I have never used), just for fun, after 25 years in microsoft products (prior to that I was in the Unix world).
    I'll be changing 2 of my classes to data classes ASAP.
    I have just read your Software Design Guide and agree with much of what you've written. I think you have glossed over the most important aspect "Who’s it intended for?". Determining who is doing what, why they do it and what they expect from it and then managing the expectations is the key to a successful implementation. You do mention your “zoom out and zoom in” approach which probably encompasses this but in my planning, the people are the key and if there are problems in this area it can be very costly down the track (we qualified our prospective clients and if the people problem was too great we walked away from deals), as you say we write the code for the client, not for us.
    Thanks

  • @techassets
    @techassets Рік тому +16

    I have an observation. Even if you remove the person.name = "Arjan" and set the dataclass frozen=True you will have a FrozenInstanceError. Because you use the __post_init__ method and the frozen dataclass does NOT allow it ! So you must remove the __post_init__ method if you want to freeze the dataclass and prove that you cannot modify it after initialization.
    THANK YOU FOR YOUR AMAZING VIDEOS !

    • @MiguelRozsas
      @MiguelRozsas Рік тому

      so, you are saying we not have both ? A frozen class and __post_init__ ? There is any workaround for this ?

  • @robboerman9378
    @robboerman9378 5 місяців тому

    I love your concise and clear explanations. Going to look into your course!

  • @christensencode7538
    @christensencode7538 2 роки тому +4

    Your videos on dataclasses are awesome! I've used them for a few projects and they really help.

  • @alfonsov3190
    @alfonsov3190 2 роки тому

    I had a couple of questions during the video, but immediately after they surged, you addressed them. Thanks a lot, as usual!

  • @Cookie-mv2hg
    @Cookie-mv2hg 2 роки тому +27

    Since we're talking a lot about dataclasses, I wonder would it be great combining with sql database. If we could get a review that would be very helpful!

  • @aminramazanifar9743
    @aminramazanifar9743 Рік тому

    The final note about slot was really great.
    Thanks

  • @flynnowen2478
    @flynnowen2478 2 роки тому +15

    Love your content Arjan! I've been making an effort to apply your teachings as much as possible in my code.
    Would you consider doing any future videos on unit testing? I think it would be super useful. I personally use pytest, but you might know better frameworks.

  • @mauisam1
    @mauisam1 2 роки тому +4

    Again Arjan, another fantastic video. If I become half the programmer you are I will be lucky. But I just have the love of programming so I will continue to work on improving my knowledge and skill set. So many programmer say just read the Docs, but I learn from examples and the Docs usually have few if not poor examples. So a big part of my improvement will be in thanks to your love of sharing your knowledge. Thank you...

  • @Volcan-kf3oz
    @Volcan-kf3oz Рік тому +15

    This guy really know what he is doing every video I've seen he able to break it down to where even a person new to python can understand
    "if you can't explain it simply, you don't understand it well enough." - Albert Einstein

  • @justinpeter5752
    @justinpeter5752 Рік тому +2

    Very good video. I think I learned a lot about classes in this video and I can see where I can use some of these in my code. Well I’m not quite there yet with building classes with multiple inheritance to worry about the issue with slots. But at least I’ll start using slots for performance improvements. Overall, bravo. I’m starting to understand more about Python from a systematical perspective.

  • @jma42
    @jma42 2 роки тому +1

    I also want to add that you can actually use asdict method from dataclasses and from_dict method from dacite library. It works as it sounds to be and even works in nested dicts/dataclasses!

  • @mampiisaotaku
    @mampiisaotaku Рік тому

    i just discovered your channel a few videos back. and what you share is pure gold

    • @ArjanCodes
      @ArjanCodes  Рік тому

      Thank you so much, glad you like it!

  • @JoshSmeda
    @JoshSmeda 2 роки тому +3

    I really love your videos on these subjects - keep it up!

    • @ArjanCodes
      @ArjanCodes  2 роки тому

      Glad to hear, Joshua - and I will ;).

  • @christopheanfry2425
    @christopheanfry2425 9 місяців тому

    Thank you so much for this video and for the design guide I’ve just download, it’s literally gold 🙏

    • @ArjanCodes
      @ArjanCodes  9 місяців тому +1

      You’re welcome! Glad you find it helpful.

  • @marknielsen4494
    @marknielsen4494 4 місяці тому

    Super high quality content - thank you Arjan!!!

    • @ArjanCodes
      @ArjanCodes  4 місяці тому

      Glad you enjoyed it, Mark!

  • @nyghl
    @nyghl 2 роки тому

    It was fun to follow along and learn! Thank you ArjanCodes.

  • @sambeard4428
    @sambeard4428 5 місяців тому

    Geweldig en duidelijk overzicht van deze erg handige feature. Gisteren liep ik precies nog tegen deze use case aan, veel boillerplate code. Dit lost het mooi op. Thanks!

  • @WalterBoring
    @WalterBoring Рік тому

    Cool video. I didn't even know about the dataclasses lib until this. I'm putting it into my project now.

  • @matthewnuzzaco2849
    @matthewnuzzaco2849 2 роки тому

    This was super helpful, I used some of these tips almost immediately.

  • @amosmunezero9958
    @amosmunezero9958 Рік тому

    Great tutorial in Python, its been a while I havent done some Python, I didnt know much about DataClass. So thank you.

  • @AbhishekVaid
    @AbhishekVaid 2 місяці тому

    The progression of introducing features and clarity of explanation is very high ! Great Job !

    • @ArjanCodes
      @ArjanCodes  2 місяці тому

      Glad you liked the video!

  • @zuydra
    @zuydra 2 роки тому +1

    Hi Arjan, your videos on Python are the best I have ever seen on UA-cam. Please keep up the good work 👍

    • @ArjanCodes
      @ArjanCodes  2 роки тому +1

      Thanks so much! And will do 😊

  • @seans9168
    @seans9168 2 роки тому

    Great overview and useful examples! Thanks for the video.

  • @ninadloke785
    @ninadloke785 2 роки тому

    Watching your video for first time. Deserves subscribe!! Great work and thanks!!

  • @ShahriyarRzayev
    @ShahriyarRzayev 2 роки тому

    Awesome material as usual, keep going and thanks for sharing)

  • @equu497
    @equu497 Рік тому

    I wasn't even trying to learn about dataclasses...but it came up on my recommended and I watched the entire thing- Got me thinking I should clean up some old code.

  • @andywilson1162
    @andywilson1162 Рік тому

    Great work Arjan, I would love to hear how you use the class when dealing with lots of data, do you use a dictionary of that class for example? Is that the best way, etc.

  • @SystemSigma_
    @SystemSigma_ 2 роки тому

    Nice overview of dataclasses.. Next, we need an extensive video about the testing frameworks and mocking for TDD!

  • @Rebeljah
    @Rebeljah 2 роки тому +4

    New AC video! I am actually using DCs right now to define a common set of data for server/client communication. It's very nice because I can subclass a super dataclass in order to get functionality like serialization/deserialization fairly easily. Adding new data types just takes a few lines of code now!

    • @centar1595
      @centar1595 2 роки тому +4

      So you're enjoying the AC/DC video? :)

    • @Rebeljah
      @Rebeljah 2 роки тому

      @@centar1595 yes I am! Lol

  • @AndreyPutilov
    @AndreyPutilov 2 роки тому

    Great explanations! Thanks for the content!

  • @rrestituti
    @rrestituti 5 місяців тому

    Amazing video. I didn't know dataclasses and I found it amazing. Thanks, Arjan . Got a new subscriber.

    • @ArjanCodes
      @ArjanCodes  5 місяців тому

      We're glad to have you, welcome aboard!

  • @Rebeljah
    @Rebeljah 2 роки тому +1

    I am 100% gonna use the repr=False option, thank you!

  • @JPy90
    @JPy90 2 роки тому

    Awesome man.! Just arrive to your channel. Seems amazing

  • @auroraRealms
    @auroraRealms Рік тому +79

    Although I like the ability to learn and use Data Classes. All my years of database programming has taught me to use JSON, and Dictionaries as much as possible. Especially in Web Services. The caveat to using Data Classes is that; changing a column type, name or description, or adding or removing columns ends up as a use case/feature ticket for the programmer which can take a bit of time to run through the development cycle. These column changes are guaranteed to happen all the time, in the life cycle of the product. A second problem, is that the code must be completely thrown out, when starting a new product. Using Dictionaries very often can allow these column changes from config files without recompiling or restructuring the code base. Going back to Web Services. Dictionaries can be web requests and responses, in JSON, without translation. This makes for high performance, and easy maintenance in the life cycle of product. It also makes copying and pasting the code directly into other products a possibility.

    • @duaneatnofroth
      @duaneatnofroth 10 місяців тому +15

      I checked out your channel in hopes to see some examples of the techniques you mentioned in your reply above. I think you might get a good response if you ever decide to do some programming videos. I'd love to see some from you.

    • @fabio.1
      @fabio.1 5 місяців тому

      👀

    • @GanklThat
      @GanklThat 3 місяці тому +1

      ​​@@duaneatnofrothhe doesn't need to give examples when what he's stating is already best practice when working with data

  • @simonetheditch809
    @simonetheditch809 2 роки тому

    Love the way you teach.
    Would be so much appreciated if you can make a similar course in C++

  • @Andremzsptm
    @Andremzsptm 2 роки тому

    Excellent video as always @ArjanCodes!

    • @ArjanCodes
      @ArjanCodes  2 роки тому +1

      Thanks Andre, glad you liked it!

  • @mpotane
    @mpotane Рік тому

    Wow, the most complete tutorial I've seen. Not a single detail has been missed.

  • @mattcauth
    @mattcauth Рік тому

    Very, very useful and well done. Thank you!

  • @alejandropereira5680
    @alejandropereira5680 Рік тому

    Very useful explanation, to the point and with real use case, really liking these vids

    • @ArjanCodes
      @ArjanCodes  Рік тому

      Thanks so much Alejandro, glad you liked it!

  • @amadzarak7746
    @amadzarak7746 8 місяців тому

    Wow! How did I JUST find this channel. You are awesome man!

  • @qrubmeeaz
    @qrubmeeaz 2 роки тому

    ... aaand he's done it again!! Brilliant! Thank you.

  • @nusermane1076
    @nusermane1076 Рік тому

    Incredibly good explanation, will try this for myself tomorrow 👍👍👍

  • @davidlakomski3919
    @davidlakomski3919 2 роки тому

    I've tried 2 days ago to make a package to manage state of jobs with Pydantic, and even if it was less messy than what I did before, I realize now how easier and cleaner it would have been with dataclasses ! Thanks for the excellent content !

    • @ArjanCodes
      @ArjanCodes  2 роки тому +1

      Glad it was helpful, David!

  • @f4bglv
    @f4bglv Рік тому

    Excellent video, very informative, concise and enjoyable... as always! Thanks again.

    • @ArjanCodes
      @ArjanCodes  Рік тому

      Thanks so much Fabio, glad the content is helpful!

  • @borisvujicic7817
    @borisvujicic7817 2 роки тому +4

    This is great. ArjanCodes, have you thought about doing a video about Python descriptors? I think it could be very useful, as there is no good ones on UA-cam.

    • @johntamplin
      @johntamplin 2 роки тому

      Take a look at the videos by Corey Schaffer. A very different style, but equally good, in my opinion. I believe he did one on Python descriptors.

  • @fuadpalchayev7269
    @fuadpalchayev7269 8 місяців тому

    Thank you Arjan!👍

  • @zakseipel9494
    @zakseipel9494 Рік тому

    Talking about strict mode that was one of the reasons I started using Black and setting it to a very strict set of rules. It forces me to write leaner code and not be lazy. Comes at a price of extra dev time but worth it.

  • @aungkyawkyaw9114
    @aungkyawkyaw9114 Рік тому

    next level! Thanks Uncle Arjan.

  • @Saidffff
    @Saidffff 2 роки тому +2

    Nice one Arjan!
    Also, __slots__ give faster attribute access AND space savings in memory due to switching to a more compact data structure. When you create many instances of the class, that is another advantage. Got that from reading 'Python distilled', written by the venerable David M. Beazly.

    • @chswin
      @chswin Рік тому +3

      Lol a python dev worried about memory allocations…

  • @ritzg98
    @ritzg98 8 місяців тому +11

    This guy is excellent. I've only watched a couple of his videos so far. Planning on watching a few more today.
    Clear, concise, accessible. So far, great!

    • @ArjanCodes
      @ArjanCodes  8 місяців тому +1

      Glad you like them!

  • @NdamuleloNemakh
    @NdamuleloNemakh Рік тому

    Exactly what I've been thinking all along, "strict mode" is a feature that must be seriously considered

  • @hcubill
    @hcubill 2 роки тому +1

    Love the video Arjan. It's great you explain the new features in 3.10. in my team we wonder what the benefit of upgrading is and this helps a lot!

  • @wtfKwaku
    @wtfKwaku 2 роки тому

    OMG, I been working on this project and for like 3 days I been trying assign a class and return something! Great Video!

  • @XCanG
    @XCanG 2 роки тому

    I use similar thing when working with fastapi, library named SQLModel, what it basicaly is very similar to dataclass, but it has validation from pydantic, so if you, say assign to person with a name type int, like Person(name=1), then you get ValidationError exception. It is more useful in fastapi as it may be used as a mechanism to prevent API being called and executed if provided arguments are not match. And you can have more validation methods in Field, like: le, ge, lt, gt; for list types you may provide min/max range, for strings you may add regex or even something more custom via function.
    I like it a bit more than just dataclass

  • @Bushade
    @Bushade Рік тому +1

    Great video Arjan! Learned quite some new things even though I regularly use dataclasses.
    One suggestion which I encounter quite often in data science: Where and when to properly calculate additional properties (features for my models) after first initialization when there are dependencies between multiple objects, e.g, you have to wait for both to finish initialization, then calculate features. I'm currently working with a hirarchy of dataclasses and calculate these properties in the top level in __post_init__ but am unsure if that's the best way. Thanks!

    • @ArjanCodes
      @ArjanCodes  Рік тому

      Thanks so much, glad it was helpful!

  • @serhiikroshka893
    @serhiikroshka893 5 місяців тому

    Great overview. Thanks.

    • @ArjanCodes
      @ArjanCodes  4 місяці тому

      Glad you enjoyed the video!

  • @AngelHdzMultimedia
    @AngelHdzMultimedia Рік тому

    Great video on Dataclasses! Thank you!
    Sadly, I had to learn with the docs, then this video popped up... :)
    +1 for the usage of type annotations. ;)

    • @ArjanCodes
      @ArjanCodes  Рік тому

      Thanks so much, glad the content is helpful!

  • @naderbazyari2
    @naderbazyari2 Рік тому

    I am modifying my code in pycharm right now according to your tips. Awesome video. Much much appreciated.

  • @jaa928
    @jaa928 2 місяці тому

    Thank you for the clear and concise explanation. As an experienced programmer, but newcomer to python this was an excellent, example-driven discussion.

    • @ArjanCodes
      @ArjanCodes  2 місяці тому

      Happy you enjoyed the content!

  • @JohnnysaidWhat
    @JohnnysaidWhat Рік тому

    Great video really interesting topic had no idea the data class decorator existed. Just a small suggestion. The top end eq on your voice is a little shrill. DeEsser or small eq to lower the high freq bands. Thank you for this video all the same!

  • @fvbakel
    @fvbakel 2 роки тому +2

    Great overview of the dataclass. I wonder what your view is on binding the dataclass to a SQL database. Is there an easy way? It seems that the Django and sqlalchemy methods are not compatible with the dataclass?
    Further more, what do you think about nested dataclass and the impact on hashing?

  • @anonymous102592
    @anonymous102592 2 місяці тому

    Thanks , great explanation, and overview

    • @ArjanCodes
      @ArjanCodes  Місяць тому

      Thank you for the kind comment!

  • @shotihoch
    @shotihoch 2 місяці тому

    And again... VERY interesting. Started as video for tea-brake, finished in my obsidian, writing down some very interesting tips. Thanks.

    • @ArjanCodes
      @ArjanCodes  2 місяці тому +1

      I'm glad you found the video useful! :)

  • @abdelkadergnichi6643
    @abdelkadergnichi6643 Рік тому

    You are awesome man i really appreciate you work bro your videos are so clear and beefy ❤❤

  • @rablaze
    @rablaze 2 роки тому

    Love the videos! I was watching a rerun of a Supernatural episode while watching this and the actor that plays Crowley and you kinda like alike lol

    • @ArjanCodes
      @ArjanCodes  2 роки тому

      LOL, I see what you mean :).

  • @franferri
    @franferri 2 роки тому

    Very nice videos Arjan, I have improved my skills a lot with some of the info.
    May I ask you the brand of the glasses you are wearing? do you have the model.

  • @marcioneto3016
    @marcioneto3016 2 роки тому +10

    Amazing video, as usual. Here's a suggestion: how about a video on the infamous Visitor pattern next? Thanks for the amazing content. I really liked the Software Designer Mindset course, by the way.

    • @ArjanCodes
      @ArjanCodes  2 роки тому +1

      Thanks for the suggestion, Márcio, and glad to hear you enjoyed the course!

  • @dabunnisher29
    @dabunnisher29 5 місяців тому

    Didn't know about these. Thank you SOOO MUCH!!!!

    • @ArjanCodes
      @ArjanCodes  5 місяців тому

      I'm glad the video was helpful!

  • @thomasoa
    @thomasoa 2 роки тому +59

    The error you got one the frozen case was not when you set .name = “Foo”, but in the __post_init__ method, setting _query_string. Is there any way to do post_init when using a frozen dataclass?

    • @yakkayakka360
      @yakkayakka360 Рік тому +1

      I noticed that too. Glad I'm not the only one. Did you ever get an answer?

  • @hisamsowaib956
    @hisamsowaib956 2 роки тому +1

    Hope you can create a video on how we can use dataclasses with data coming from db. I think that is a more real life scenario. Thanks a lot.

  • @presstv
    @presstv Рік тому

    great video. Thanks Arjan

  • @xl0xl0xl0
    @xl0xl0xl0 2 роки тому

    Thank you for the video. You could use the Jupyter integration with vscode to avoid switching back and for the between code and output.

    • @ArjanCodes
      @ArjanCodes  2 роки тому

      Thanks for the suggestion - will look into this!

  • @radomirmijovic2605
    @radomirmijovic2605 Рік тому

    Great video! Thanks

  • @davecobb5649
    @davecobb5649 Рік тому

    Great video, very helpful. What editor are you using? Thanks

  • @joshlee9330
    @joshlee9330 2 роки тому

    If you're printing an object you'd expect the repr to be printed, not str, no? Thanks for videos! Enjoying this one on my lunch break 😋 Every few seconds I find myself yelling "wait what?!" Learned a lot!!

  • @vladimirsumarokov6847
    @vladimirsumarokov6847 Рік тому

    VERY useful! Thanks!

    • @ArjanCodes
      @ArjanCodes  Рік тому

      Thanks Vladmir, Glad that you liked it.

  • @wv1138
    @wv1138 2 роки тому

    Good point about a possible strict mode

  • @8bitscoding220
    @8bitscoding220 2 роки тому +2

    Cool video, thanks for it. I think that I would argue that if there are valid arguments against multiple inheritance (and valid arguments in favor of it), the limitations of an oriented object language should not be considered one. To make Python better we have to stop defending the poor design choices that were made in the past and move forward (I'm all in favor of breaking things if I can finally write def myfunc(myarg=[]) like in any other language, for example).

  • @lukasbelck4514
    @lukasbelck4514 2 роки тому

    Great content as always!

  • @ivanrezic3639
    @ivanrezic3639 2 роки тому

    Hi Arjan, great video. What do you prefer Pydantic or dataclass and why?

  • @emory_blame
    @emory_blame 2 роки тому

    Hey. Nice video)
    Everything were fine and helpful until the 21:00 where you suggest to not using the inherent.
    For newcomers to python I can suggest video called super - is super. It were very helpful to me.

  • @AlanHernandez-mw6xb
    @AlanHernandez-mw6xb Рік тому

    This was actually very entertaining. Thanks!🎃

    • @ArjanCodes
      @ArjanCodes  Рік тому

      Thanks so much Alan, glad you liked it!

  • @metensis
    @metensis 2 роки тому

    Great video! You may want to add in a new video the new feature of 3.10 to allow children dataclasses with kw_only

  • @joxa6119
    @joxa6119 10 місяців тому

    Hi Arjan. This is a very excellent video. By the way, can I know what is the extension you used when you run the code (I mean when you click the | > button)

  • @thallysrc
    @thallysrc 2 роки тому

    i simply love your channel

  • @vitharana1996
    @vitharana1996 3 місяці тому

    Nice explanation!

    • @ArjanCodes
      @ArjanCodes  3 місяці тому +1

      Glad it was helpful!