Python Classes, Objects, Inheritance & Polymorphism for Beginners

Sdílet
Vložit
  • čas přidán 6. 09. 2024

Komentáře • 15

  • @aravindhvijayanandan3010
    @aravindhvijayanandan3010 Před 10 měsíci +3

    Amazing !!! Just began my journey into Python programming. Even though some these concepts flew over the head, really enjoyed your explanation.
    Like and subs from India !!!

  • @ShukyPersky
    @ShukyPersky Před 8 měsíci +1

    Thanks for the video.
    I have a comment on the polymorphism portion of the video.
    It is NOT polymorphism though it aligns with "many forms" meaning.
    The polymorphism demonstration in the video has nothing to do with polymorphism,
    It is purely typecast (and has to do with the fact that Python is weak-type/dynamic-type language)
    which means that the type of a variable is derived from the type of the value it refers to
    The below explains what you demonstrated:
    a = 7 # a refers an int type object
    a = 7.0 # a refers a float type object
    polymorphism means that a variable that refers an object of certain type can refer another type (like in C++ where a pointer to base class type can point to derived class type either).
    but this can not take place in Python, as the interpreter changes type of a variable according to the type of the data that variable refers to
    Due to the dynamic-type nature of Python, I'm afraid that Python has no polymorphism though so wrongly claimed

  • @manoharsagunthalla9215
    @manoharsagunthalla9215 Před 2 měsíci

    Your explanations are wonderful! when we inherit the class we add one parameter in the derived class(say faa_id in the Airplane class). but you have not explained how to display that added parameter when we invoke the model. will you please explain how to display that too.

  • @deepatterson1894
    @deepatterson1894 Před 4 měsíci

    I am still working through lessons, was stuck for a long time on the arcade lesson, which I think was really cool to test us on. I had to go back and make sure I really understood what I was doing. I made my own rps style, same code but did a lot more variations with fstring's and emojis. Though I did a lot of it correctly on the guess number game I was still blown away with differences in your code. I had to go back and try look at some of those lessons. I am very slow at this. I am not planning a career but a making a personalized app. I don't think it is going to be a very complex program but still have a lot of learning to do before I can start on that. Oh yah my arcade didn't work correctly because I had a return to game function where it should have just been return game_blabla without the (). I thought I was never going to find the problem. I want to say it was RPS code where the issue was, been a few days since I found the issue.

  • @user-oc5dv5jc6i
    @user-oc5dv5jc6i Před rokem +1

    Love your stuff as usual Dave

  • @Nihal0522
    @Nihal0522 Před rokem

    3) Hi, Sir my question is how many topic you will cover in upcoming days?
    Or how many days it will take?
    Actually my exam is coming in upcoming next month.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Před rokem +1

      I cover one Python topic per week right now. There are likely at least 6 more videos in this series.

  • @johnaweiss
    @johnaweiss Před 7 měsíci

    Your getter would be more helpful if it `returned` something, rather than `print` something. Properties typically return something, and don't do something.

  • @utinthein7274
    @utinthein7274 Před rokem

    Thanks you, Sir.

  • @abhaydhiman1920
    @abhaydhiman1920 Před 11 měsíci +1

    A one shot or playlist of videos on Java Script will be great ....!
    Love From India

  • @tomjones8293
    @tomjones8293 Před rokem

    Nice content and learner but Python does NOT have Polymorphism concept in OOP sense as we know it e.g like in Java using overloading , overriding methods because Python is DYNAMIC language . your "polymorphism" here is according to Cambridge dictionary not in programming sense :) hope this helps

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Před rokem +1

      Many Python resources cover polymorphism. I'm doing the same here. It's not "my polymorphism".

    • @tomjones8293
      @tomjones8293 Před rokem

      @@DaveGrayTeachesCode I see what you mean now I get it thanks