What is Polymorphism in Python?

Поделиться
HTML-код
  • Опубликовано: 11 фев 2025
  • In today’s video we’re going to be learning about Polymorphism in Python. Note that polymorphism is not exclusive to Python, and that the concepts you will learn in this video practically apply to every programming language.
    Learn about abstract methods: • @abstractmethod explai...
    ▶ Become job-ready with Python:
    www.indently.io
    ▶ Follow me on Instagram:
    / indentlyreels

Комментарии • 23

  • @elu1
    @elu1 5 часов назад

    well done in explaining the concept!

  • @danielputter
    @danielputter 6 часов назад +4

    2:39 That’s operator overloading, not polymorphism. Polymorphism is adding values of multiple types to a value of one type (i.e. string + string, string + list, string + bytes)

  • @oromogamer1431
    @oromogamer1431 6 часов назад

    Thanks for the detailed explanation as you said in the intro I have been using this without knowing the name of it which surprised me. 🎉🎉

  • @thrillvilled111
    @thrillvilled111 7 часов назад

    Thanks man!

  • @afgfuturetube
    @afgfuturetube 9 часов назад

    What is meta class would you make a videos

  • @ChongFrisbee
    @ChongFrisbee Час назад

    PaymentType works better as a Protocol, in my opinion. But I can see why this wasn't used in the video

  • @Vassimau
    @Vassimau 4 часа назад

    Everyone stressing about not having a job and and thinking of everything I can do with it!

  • @Pawlo370
    @Pawlo370 9 часов назад

    no it didn't doing f-string in VSC

  • @nemoshu7119
    @nemoshu7119 4 часа назад

    Python is misspelt in the description😅

    • @Indently
      @Indently  2 часа назад

      It has been fixed!

  • @JarheadCrayonEater
    @JarheadCrayonEater 6 часов назад +2

    This is just inheritance.
    Polymorphism means to extend the functionality, which is not being done here at all.

    • @KaraSuraDraw1
      @KaraSuraDraw1 Час назад

      This is Polymorphism. Concept of Polymorphism refers to the ability of different objects to respond to the same method or function call in different ways. Exactly what happens here.

    • @JarheadCrayonEater
      @JarheadCrayonEater Час назад

      @KaraSuraDraw1 , technically, sure, you're correct. However, I wouldn't use the term here and instead would have simplified this to simply inheritance or method overriding.
      The reason I differentiate these is because 25+ years ago (I started programming in 1986) polymorphism was not referenced when talking about inheritance. It's a term that covers to broad an area and causes confusion in junior devs.
      Call inheritance and method reuse/overriding just what it is. Simple.
      Leave polymorphism to interfacing and actually extending class functionality beyond its original intent.

    • @KaraSuraDraw1
      @KaraSuraDraw1 Час назад +1

      @@JarheadCrayonEaterahh okey, makes sense. You have more experience then i have, but as far as i know Python does not have explicit interfaces like Java or C#, hence why the title is “polymorphism in python”.

    • @JarheadCrayonEater
      @JarheadCrayonEater Час назад +1

      @KaraSuraDraw1 , actually, very good point! I'm not a Python dev. Sure, I know it, but don't use it near as often as other languages.
      If Python doesn't have what others do, then absolutely okay with me you simply call that polymorphism!
      I stand corrected!

  • @tamalchakraborty5346
    @tamalchakraborty5346 9 часов назад +6

    As good as this video gets but whats the point of learning if there are no jobs?

    • @ecaltroyer
      @ecaltroyer 9 часов назад +8

      Create your own job

    • @tamalchakraborty5346
      @tamalchakraborty5346 9 часов назад +1

      @ecaltroyer Tried doing that as well. Could have saved me 8 years in University if I had know about the current situation.

    • @tuhin1264
      @tuhin1264 9 часов назад +2

      Learn and start teaching others 😂

    • @iiiiii-w8h
      @iiiiii-w8h 8 часов назад +6

      get any job. Automate it with python. Don't tell anyone. Get a second job. Repeat.

    • @user-lg4le8xr4s
      @user-lg4le8xr4s 6 часов назад +5

      I know this is mind blowing for some, but you can code without it being a job