Python Programming Tutorial – 32 – Inheritance

Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts

Comments

ININvideos says:

Fantastic explanation. Keep up the good work! Thank you!

Marv3Lthe1 says:

What happens if two classes inherit each other? like child(parent) and parent(child)

A.S.I. says:

It was fake!!??

M. Ali Akbulut says:

Why it didn’t print out the last name when he wrote that ” bucky.print_first_name() ” I suppose that inside of the child class there is Parent class so there is print(“Roberts”) but the program didn’t print the last name

Burdurky says:

Bucky’s mumma was a monkey, what he says makes so much sense now, because my mumma was also a monkey.

Erik Ek says:

Overriding? OVERRIDING? I will pretend I didn’t se that… Class traitor!

Eyal Pery says:

King

Jatin Lalwani says:

Am i revising Java?

Sampath pavan kumar says:

why parenthesis is used in class name of parent?

Ankit Basarkar says:

You make understanding things so simple that if I was gay I would have loved dating you…

John McConnell says:

no 1080p?

videovulcan says:

How do you use __init__ within the super class? Otherwise you have to inherit static variables

I want to know how to make a parent object then, a child object and specify that the parent object as a param while inheriting the methods.

so far when i make the child object i say that for example

ric_parent = Parent(‘Doe’, 54)
ric = Child(‘Ric’, ric, ric_parent)

print(ric.parent.surname)

I don’t want to have to go through parent to get my surname, I just want ric.surname

Hard to explain

DN PRANK says:

LOL My Mother was a Monkey haha

Alan Weng says:

class parents():

    def print_last_name(self):
        print(‘Weng’)

    class Child(Parents):

        def print_first_name(self):
            print(‘Alan’)

Alan = Child()
Alan.print_first_name()
Alan.print_last_name()

 File “/Users/Alan/PycharmProjects/untitled1/DarkFiles.py”, line 6, in parents
    class Child(Parents):
NameError: name ‘Parents’ is not defined

EPICHacks1996 says:

self=this in java

ripperx444 says:

Hey Bucky can you explain abstract classes in a video please?

areesetotle says:

how can he say that his mother was a monkey without cracking up. man this guy is a legend

Thania Jurado says:

“So, what the heck…?” haha, oh boy I love your tutorials XD Thanks 😉

Martijn Hoekstra says:

Bucky Snitzleberg… aaaallrighty then :’)

Adam C says:

This really helped out with a coding problem I was working on – thanks. 

Richard Northrup says:

First

joshua hylton says:

i will never forget about inheritance purely because of the monkey story and how he tried to tie the two together xD

Ronald Crabtree says:

inheritance sounds awesome

Jack Criss says:

You’re just so funny. I have fell in love with you!

salsa4u says:

is no –init– necessary here?

Huagang Huang says:

I like your videos,thanks very much!I am from china. You are a smart guy.

karim toulala says:

t’as vraiment un prénom de merde

Aravind Basmi says:

I think is it needed to put Parent in def Child(Parent): just curious as the result displays the same without the Parent.

Mohammad Barghamadi says:

Thanks a lot for Your Great Inheritance Tutorial in Python
You Are Great Teacher (Really One of The Best)
Thanks tooooooooooooooo Much!

Hisham Mubarak says:

The best resource available online to understand ‘Inheritance’!

talha tariq says:

I remember you at that circus Snitz.You were great!but your mom. not so much.

Marko Suchy says:

Hi, im 13 and I’d just like to say thanks so much for the videos they’re really helpful

Harry Newton says:

hey bucky havent u already done python tutorials like 4 or 5 years ago? im not saying dont do them again , i like them but y u doing it again?

nlee says:

Does the child class also inherit class variables from the parent class if they exist? Could you also override that variable in the child class?

Shudharsan Muthuraj says:

Till last lecture, there are no parenthesis for class and suddenly it started here!! Both are correct syntax?

Joe Wall says:

so your dad is a monkeyfucker?? o_O

Alex Stefanov says:

5:38 your mother is probably not proud of you right now
6:45 wait, the story was fake?

 Write a comment

*

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!