Python Interfaces and Abstract Base Class (ABC): A Must-Know for Advanced Programmers

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024

ความคิดเห็น • 21

  • @anujonthemove
    @anujonthemove 2 วันที่ผ่านมา

    🖥️ Very clearly explained. The best part is that you did not directly jump into explaining abstract classes but gave a context about how things work in different languages and in what ways python is different.

  • @JefferyHarrold
    @JefferyHarrold 7 หลายเดือนก่อน +4

    The Talking interface and associated implemented Talking class...them having the same name and working, was that just a quirk of Python that shouldn't be encouraged because it will probably be fixed at a later date?
    Looking at the autocomplete prompts that were coming up, probably from practicing, was the implemented Talking class supposed to be called TalkingDog?

    • @k0nze_builds
      @k0nze_builds  7 หลายเดือนก่อน +1

      You are absolutely correct. I actually made a mistake while recording, the listings in the accompaniment blog article show the correct code.

  • @estevaoyt
    @estevaoyt 7 หลายเดือนก่อน +1

    Beautiful explanation, now it's clear to me the difference between an abstract class and an interface. Keep it up!

    • @k0nze_builds
      @k0nze_builds  7 หลายเดือนก่อน +1

      Glad it was helpful!

  • @jorgesegundorojas6119
    @jorgesegundorojas6119 24 วันที่ผ่านมา

    Cool content, I'm new on Phyton but in my minimal experience with this language I've noticed that, in comparison with other languages, there's a lot of errors than may happen at runtime. Unfortunately, the lang is used in a lot of areas and it's important to learn it.

  • @danielschmider5069
    @danielschmider5069 5 หลายเดือนก่อน

    Giving the interface and the class the same name was weird, I was really surprised this actually worked! Is it because the Talking Class is defined later (further down) in the code?

  • @elias6406
    @elias6406 6 หลายเดือนก่อน

    I honestly don’t understand you don’t many views. I enjoyed your explanation. I would like to see a complete tutorial especially on oop and design patterns.

  • @dhananjayharidas4327
    @dhananjayharidas4327 3 หลายเดือนก่อน

    Great explanation

  • @adeolaogunleye7965
    @adeolaogunleye7965 4 หลายเดือนก่อน

    Nice video, I really enjoyed it.

  • @sharimiqbal5803
    @sharimiqbal5803 3 หลายเดือนก่อน

    What ide you are using?

  • @ajaynarayanan2326
    @ajaynarayanan2326 4 หลายเดือนก่อน

    Nice video

  • @mariuszdrabik7119
    @mariuszdrabik7119 หลายเดือนก่อน

    Why not use something like this: IsTalking(ABC) and class Dog(Animal, IsTalking)? This would be more logical, and super is not needed in the child class if there are no changes to the class fields

  • @2sourcerer
    @2sourcerer 3 หลายเดือนก่อน +1

    Doesn't quite explain what "ABC" is for. Removing it doesn't break things.

    • @2sourcerer
      @2sourcerer 3 หลายเดือนก่อน +1

      Oh i see, that abstractmethod decorator has no effect unless subclassing an ABC. But still doesn't explain why the Animal class needs it.

    • @amersulaiman1827
      @amersulaiman1827 3 หลายเดือนก่อน +1

      It makes the class abstract, so it can't create an object feom it directly, but from another class that inherits it

  • @esbee296
    @esbee296 5 หลายเดือนก่อน

    🖥

  • @pepijnkrijnsen4
    @pepijnkrijnsen4 5 หลายเดือนก่อน

    💻

  • @godray25
    @godray25 4 หลายเดือนก่อน

    🖥

  • @jmcoxD
    @jmcoxD 5 หลายเดือนก่อน

    🖥