Abstract Base Class & @abstractmethod | Python Tutorials For Absolute Beginners In Hindi #68

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ม.ค. 2025

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

  • @shiv366
    @shiv366 3 ปีที่แล้ว +23

    This guy is born to help people. God bless you. Great valuable videos. Learning a lot from you bro. Thank you..

  • @VikasChauhan-ue2th
    @VikasChauhan-ue2th 3 ปีที่แล้ว +47

    Everyone: How to resolve this error?
    Harry Bhai: How to get this error 😆😆

  • @buddhadebbairagi2022
    @buddhadebbairagi2022 3 ปีที่แล้ว +15

    Abc metaclass is to as a checker, who Insures that certain methods must be implemented by The inheriting class

  • @anindian4601
    @anindian4601 3 ปีที่แล้ว +13

    I Was watching telusko channel to learn python but abstract i could not understand there, so searched other video , i understood very clearly with this video, THANKS A LOT DUDE, inshah allah i like to go thru ur videos inshah allah. thank u .

  • @MystikPrae
    @MystikPrae ปีที่แล้ว +2

    from abc import ABC,abstractmethod
    class Animal(ABC):
    @abstractmethod
    def eat(self):
    print("This is eating something")
    class Rabbit(Animal):
    def eat(self):
    print("This is eating grass")

    obj=Rabbit()
    obj.eat()

  • @mahfoozahmad2565
    @mahfoozahmad2565 4 ปีที่แล้ว +16

    0:21 BC matlab base class, Kuchh aur mat samajh baithiyega 😁😁😂😂

  • @samirpaul2
    @samirpaul2 2 ปีที่แล้ว +3

    Congratulations for 3M Subscribers🎉
    1st watched this video he has 70K. again now watching it is 3 Millions.

    • @veernavani
      @veernavani 2 ปีที่แล้ว +1

      Edward elric

  • @manishkushwaha1167
    @manishkushwaha1167 4 ปีที่แล้ว +2

    thank you sir aapki wajah se aaj me apni life ki first programming langguage sikh paya hu thank you so much sir

  • @prakharmishra9812
    @prakharmishra9812 4 ปีที่แล้ว +7

    3:31 too good to make errors 😂😂

  • @snivin5618
    @snivin5618 2 ปีที่แล้ว +1

    from abc import ABC, abstractmethod
    class Vehicle(ABC):
    @abstractmethod
    def start_engine(self):
    print("Engine started")

    class Bike(Vehicle):
    def start_engine(self):
    print("Bike engine started.")
    wheels = 2
    ktm = Bike()
    ktm.start_engine()
    I think this is a good example for abstractmethod.

  • @engineerbhai7642
    @engineerbhai7642 5 ปีที่แล้ว +2

    Excellent coder in you tube

  • @stropurbo
    @stropurbo 21 วันที่ผ่านมา

    best teachers💗💗💗

  • @manojrudra6007
    @manojrudra6007 2 ปีที่แล้ว +1

    i can do it. i will be a good programmer, thank you harry bhai.

  • @manasverma.mp4
    @manasverma.mp4 4 ปีที่แล้ว +16

    i was thinking till this video that "harry bhai bahut sidhe hai vo kahan ye sab bolte honege" 0:19 LOL

  • @saharayub4448
    @saharayub4448 2 ปีที่แล้ว +1

    god bless you!

  • @amesawant1
    @amesawant1 4 ปีที่แล้ว

    bhai, itna simplified kiya abstract class concept ko. Thanks

  • @n.r.7616
    @n.r.7616 2 ปีที่แล้ว +1

    Thank you Bhai

  • @owaisfarooqui6485
    @owaisfarooqui6485 4 ปีที่แล้ว +72

    kuch aur mat samaj baithiega ! 😂

  • @sanskar_choudhary
    @sanskar_choudhary 5 ปีที่แล้ว +3

    Thanks, nice explanation

  • @ambalika5712
    @ambalika5712 2 ปีที่แล้ว +1

    BC matlab side of a Triangle ABC :)

  • @zenyoko
    @zenyoko 2 ปีที่แล้ว +2

    #day68

  • @onepiececountry1471
    @onepiececountry1471 ปีที่แล้ว

    Thanks man you made it easy

  • @abhaykanwasi881
    @abhaykanwasi881 ปีที่แล้ว

    When harry bhai write his own book of Python Programing ☺

  • @2minutesquickvideos588
    @2minutesquickvideos588 4 ปีที่แล้ว +2

    Very nice! Book definitions are super confusing...

  • @komaldewnani5747
    @komaldewnani5747 4 ปีที่แล้ว +1

    Thank you sir

  • @ishtiaqahmad4118
    @ishtiaqahmad4118 4 ปีที่แล้ว

    I am sure, this video will be great helpful obviously. I.A.Siddiqui

  • @sudarshanmhaisdhune1039
    @sudarshanmhaisdhune1039 4 ปีที่แล้ว

    Badhiya harry bhai.....thoda pace jyada ho gya video ka😅.....anyways great

  • @codewithharryfanchannel559
    @codewithharryfanchannel559 5 ปีที่แล้ว +1

    Best

  • @plasmalife5532
    @plasmalife5532 4 ปีที่แล้ว

    Love you bro 🤗🤗

  • @RohanDasRD
    @RohanDasRD 6 ปีที่แล้ว +2

    Bhai is on form aaj ke video mein

  • @aakashnishad7048
    @aakashnishad7048 5 ปีที่แล้ว +1

    Thaks sir

  • @samuelfrank9947
    @samuelfrank9947 3 ปีที่แล้ว

    Thanks a lot

  • @shibnathvlogs_1997
    @shibnathvlogs_1997 4 ปีที่แล้ว +1

    Y return(0) in metaclass

    • @buddhadebbairagi2022
      @buddhadebbairagi2022 3 ปีที่แล้ว +1

      Because metaclass is to ensure that all child classes must have the 'printarea' function, you must return 0 to make it an empty function.

  • @MalaYadav-he2ti
    @MalaYadav-he2ti 14 ชั่วโมงที่ผ่านมา

    Please use dark modes

  • @Dailythingsx
    @Dailythingsx 4 ปีที่แล้ว +2

    from abc import ABCMeta,abstractmethod
    class geometry(metaclass=ABCMeta):
    @abstractmethod
    def area_s(self):
    return 0
    class Square(geometry):
    Sides="4"
    def __init__(self,side):
    self.side=side
    def area_s(self):
    return f"Area is {self.side*self.side}"
    shapes_s=Square(12)
    print(shapes_s.area_s())
    ramu=geometry()
    print(ramu.area_s())

  • @thestranger9577
    @thestranger9577 6 ปีที่แล้ว +2

    Itne dhama dham vdo araha hai...kafi sara dekhna pending hai.....but feeling good, I'll finish all these by this Sunday

    • @ItsMe-zr9xf
      @ItsMe-zr9xf 4 ปีที่แล้ว

      Bro what is your position today
      Means how many languages you learn or doing some job?

  • @thebakchodvines5190
    @thebakchodvines5190 6 ปีที่แล้ว

    Superb bro

  • @shahsahab6796
    @shahsahab6796 4 ปีที่แล้ว +3

    Which book do you use for these tutorial?
    Please

    • @indiankidscoder8190
      @indiankidscoder8190 3 ปีที่แล้ว

      he is himself a programmer why will he use a book?
      but if you want then you can search and buy a book

  • @aritralahiri8321
    @aritralahiri8321 5 ปีที่แล้ว +3

    A Little slow in pace could be helpfull

    • @arjunmaindarkar106
      @arjunmaindarkar106 4 ปีที่แล้ว

      You can Reduce the speed by clicking on settings(The one on the bottom-left of the screen)-->Playback speed

    • @akshitthakur3842
      @akshitthakur3842 4 ปีที่แล้ว

      @@arjunmaindarkar106 That's probably not what he meant. But lol😂

  • @sanketh768
    @sanketh768 4 ปีที่แล้ว +2

    from abc import ABC, abstractmethod
    class Shape(ABC):
    @abstractmethod
    def printarea(self):
    return 0
    s1-Shape()#this line throws an error
    as per my understanding we are not allowed to instantiate a metclass?
    Am i correct?

    • @harshnegi5811
      @harshnegi5811 4 ปีที่แล้ว +6

      Yes, we can't instantiate an abstract class because its an incomplete class without any proper functionality and output for the abstract methods. these abstract methods are just meant for other child classes to be implemented. Thus we need a concrete subclass to get instantiated with the help of an object. Hope it helped :)

    • @awslearningpankaj2825
      @awslearningpankaj2825 2 ปีที่แล้ว

      @@harshnegi5811 we we create an object like s1 = Shape you can access the abstract mehtods

  • @chetanbansal7693
    @chetanbansal7693 4 ปีที่แล้ว

    Nice bro

  • @deekshasingh3
    @deekshasingh3 4 ปีที่แล้ว

    Thanku sir

  • @yogeshverma3580
    @yogeshverma3580 4 ปีที่แล้ว +1

    Sir, Can we create more than one abstract class ..

  • @pranjalsingh3823
    @pranjalsingh3823 4 ปีที่แล้ว

    harry bhai ye class ko jb object bnate h tb class name ko function type kyun likhte h
    for example rect1 = Rectangle()

  • @ADESHKUMAR-yz2el
    @ADESHKUMAR-yz2el 3 ปีที่แล้ว +1

    kuchh nhi hua vro
    wo harry ki explaination dekh li ab
    bas jindagi me kuchh aur nhi chahiye

  • @Swaapnilarts
    @Swaapnilarts 3 ปีที่แล้ว

    How can be a Class Not an Abstract Class without implementing any abstract method from parent class?

  • @indiankidscoder8190
    @indiankidscoder8190 3 ปีที่แล้ว

    sir, can we create a class inside a class??

    • @indiankidscoder8190
      @indiankidscoder8190 3 ปีที่แล้ว

      I mean what is inner class??

    • @creaturetrendy
      @creaturetrendy 3 ปีที่แล้ว +1

      @@indiankidscoder8190 I think you can't do it. Becoz this is disobeying the inheritance.

    • @raghavmanishraghavmanish8468
      @raghavmanishraghavmanish8468 2 ปีที่แล้ว

      ha ho ja rha brother maine krke dekha niche ka code dekho
      # date 07 july 2022
      class Quadrilatera:
      type="four sides"
      angle="four angles"
      def __init__(self,lenth1,lenth2,breadth1,breadth2,diagonal,perpendicular1,perpendicular2) :
      self.lenth1=lenth1
      self.lenth2=lenth2
      self.breadth1=breadth1
      self.breadth2=breadth2
      self.diagonal=diagonal
      self.perpendicular1=perpendicular1
      self.perpendicular2=perpendicular2
      print("Area of quadrilateral = (½) * diagonal length * sum of the length of the perpendiculars drawn from the remaining two vertices.")
      def area (self):
      self.area=(1/2)*{self.diagonal1}*{self.perpendicular1+self.perpendicular2}
      class Rectangle:
      type="quadrilateral"
      sides=4
      angles=4
      def __init__(self,lenth1,lenth2):
      self.lenth1=lenth1
      self.lenth2=lenth2
      def area (self):
      self.area=self.lenth1*self.lenth2
      a=Quadrilatera(21,32,65,4,56,567,67)
      b=Quadrilatera.Rectangle(23,45)
      print(a.lenth1)
      print(b.lenth1)

    • @raghavmanishraghavmanish8468
      @raghavmanishraghavmanish8468 2 ปีที่แล้ว

      @@creaturetrendy
      ha ho ja rha brother maine krke dekha niche ka code dekho
      # date 07 july 2022
      class Quadrilatera:
      type="four sides"
      angle="four angles"
      def __init__(self,lenth1,lenth2,breadth1,breadth2,diagonal,perpendicular1,perpendicular2) :
      self.lenth1=lenth1
      self.lenth2=lenth2
      self.breadth1=breadth1
      self.breadth2=breadth2
      self.diagonal=diagonal
      self.perpendicular1=perpendicular1
      self.perpendicular2=perpendicular2
      print("Area of quadrilateral = (½) * diagonal length * sum of the length of the perpendiculars drawn from the remaining two vertices.")
      def area (self):
      self.area=(1/2)*{self.diagonal1}*{self.perpendicular1+self.perpendicular2}
      class Rectangle:
      type="quadrilateral"
      sides=4
      angles=4
      def __init__(self,lenth1,lenth2):
      self.lenth1=lenth1
      self.lenth2=lenth2
      def area (self):
      self.area=self.lenth1*self.lenth2
      a=Quadrilatera(21,32,65,4,56,567,67)
      b=Quadrilatera.Rectangle(23,45)
      print(a.lenth1)
      print(b.lenth1)

  • @JayantaBorah-j6y
    @JayantaBorah-j6y 21 วันที่ผ่านมา

    Your teach well but sometime I feel that you go very fast.

  • @tanvirulislam514
    @tanvirulislam514 2 ปีที่แล้ว +1

    when bug becomes feature

  • @theamazingfan8889
    @theamazingfan8889 4 ปีที่แล้ว +3

    0:19 lol

  • @krishivsharmaarts8716
    @krishivsharmaarts8716 3 ปีที่แล้ว

    I am using the 3.9 version of python is it ok

  • @raghavmanishraghavmanish8468
    @raghavmanishraghavmanish8468 2 ปีที่แล้ว

    anyone also who enjoying the this playlist at this in these days

  • @pratikdokhe7198
    @pratikdokhe7198 4 ปีที่แล้ว

    Bhai... Yaar please batao vo return 0 kyu liya hai....
    Print area mai....
    🤕🤕

  • @nikhilanandagoswami9220
    @nikhilanandagoswami9220 3 ปีที่แล้ว

    harry bhaiya init function vs code me kiu kam nehi kar raha hai ....please blo app kuch

  • @shivamkapoor1827
    @shivamkapoor1827 6 ปีที่แล้ว +1

    Bhai django per series banao

  • @avnishnagpal
    @avnishnagpal 3 ปีที่แล้ว +1

    what is the practical use of these abstract classes & methods?

    • @259_parthpatidar9
      @259_parthpatidar9 3 ปีที่แล้ว +1

      to hide internal details in real life it is like " AAM KHAO GUTLIYA MT GINO" so only method name is provided in parent class and implementation in child class.

  • @mukulsinghbisht2434
    @mukulsinghbisht2434 4 ปีที่แล้ว +1

    only 1100 people are watching tut. seriously

  • @nischalsehrawat2130
    @nischalsehrawat2130 4 ปีที่แล้ว

    Bhai Harry lekin Abstract class ki zaroorat kyu padti hai ye to bata do, implement to ho hi jayga

  • @thebakchodvines5190
    @thebakchodvines5190 6 ปีที่แล้ว +1

    Woww

  • @pjvlogbypriyanshu
    @pjvlogbypriyanshu 4 ปีที่แล้ว

    @CodeWithHarry module not found error : no module named 'abstractmethod' plz help me

    • @real_property
      @real_property 4 ปีที่แล้ว

      import it properly

    • @helium999_
      @helium999_ 3 ปีที่แล้ว

      maybe u have kept file name as abstractmethod or any other module name

  • @skpandeyg
    @skpandeyg 6 ปีที่แล้ว

    Ye sab to thik hae lekin @property kya hota hae

  • @siddhantkumarsinha6183
    @siddhantkumarsinha6183 4 ปีที่แล้ว

    what does @abstractclassmethod actually does? didnt really get that, can anyone help me please.

    • @rathodhitendrasinh5690
      @rathodhitendrasinh5690 4 ปีที่แล้ว

      @abstractmethod is decorator . And in short it will not allow us to execute class which are inherited from abstract class unless all abstract class method and properties are overridden .

  • @tradingkeeda5575
    @tradingkeeda5575 4 ปีที่แล้ว

    bhai plzz stock market ki algos banane ki series shuru kr do plzzz

  • @tothepoint5480
    @tothepoint5480 3 ปีที่แล้ว +1

    At least tell the use of abstract class and what is basic concept....
    All videos upto this point are good but this one is not that much effective

  • @aqdasak
    @aqdasak 4 ปีที่แล้ว

    ❤️

  • @bigbillionstartup4122
    @bigbillionstartup4122 4 ปีที่แล้ว

    Kuch aur mt samajh lena at 0:20

  • @TariqAhmed_
    @TariqAhmed_ 4 ปีที่แล้ว +8

    Hahaha kch aur mat smjh bethiyega 🤣

  • @harshadgowardhanbhai1846
    @harshadgowardhanbhai1846 6 ปีที่แล้ว +2

    I'm First

  • @Captain.morgan728
    @Captain.morgan728 4 ปีที่แล้ว +4

    Kuch aur mat samaj bhetiyega
    🤣🤣

  • @pickachoogaming8901
    @pickachoogaming8901 3 ปีที่แล้ว

    Ham bahut sidhe bache hai

  • @Krypton_05
    @Krypton_05 3 ปีที่แล้ว

    BC = Base Class
    galat mat samjho

  • @amarjeetmallah3289
    @amarjeetmallah3289 3 ปีที่แล้ว

    Are bhai tumhare bolne ke baad yaad aya. BC ka double mean.

  • @PrateekRaj3
    @PrateekRaj3 3 ปีที่แล้ว

    abstract backchod class, hahaha

  • @harshitachaurasia1246
    @harshitachaurasia1246 4 ปีที่แล้ว

  • @dmaskguy
    @dmaskguy 5 ปีที่แล้ว

    Ratta

  • @gautamgoswami9510
    @gautamgoswami9510 2 ปีที่แล้ว

    # -*- coding: utf-8 -*-
    """
    Created on Wed Jan 4 09:43:46 2023
    @author: Dell
    """
    from abc import ABCMeta,abstractmethod
    class Hazur(metaclass=ABCMeta):
    @abstractmethod
    def love(self):
    return 0

    class babaji(Hazur):

    def __init__(self):
    return print("my name is:")
    def love(self):
    return print("I love you 3000 times")

    class gtm(Hazur):
    pass
    def love(self):
    return print("I love you 9000 times")

    gt=babaji()
    gt.love()
    g=gtm()
    g.love()
    sir I have doubt here when I give pass in gtm class then why is it giving correct result instant of error because pass is give here so compiler should move from here but it read till last line why