Uploader Comments (derekbanas)
All Comments (16)
-
What does that super()-function do? I dind't quite get it.
-
Should this work in py 2.5?
-
@baffie first time i saw the video I had no idea what you were talking about, but now it makes perfect sense to ask that question. Good job derekbanas btw
-
@baffie That's "noticed", not "notest".
-
I have several questions Derek, but one at a time. . .On the function set_attributes(self,key,value)
: I don't understand the 2nd line self._attributes[key]=value??? I don't understand the [key] on the end of self._attributes? Why is it written like this? I just don't understand that line at all. If you could explain that to me as if I was a 10yr old, LOL, please. -
Hey DerekBanas,
i am realy enjoing these tutorials. Thanks for making them.
I do have a little question though. When you change your constructor to __init__(self, **kvargs) you did not remove __name and __owner local variables.
when i make a Animal object does is these two variables still get used or is there some underwater dictionairy where alle the variables are stored?
I notest that you call the animal constructer with __name and __owner yet when you make a new attribute it is done as a string 'like so: Animal.setAttribute( 'clean ', Ýes')
is this because this is a "New" or not pre defined variable? and when you do it with a pre defined attribute it can be done like Animal.setAttribute( __name, 'Jan')?
baffie 5 months ago
@baffie Yes you are correct
derekbanas 5 months ago
When you created the class Dat, you defined the __init__ constructor method by typing "def __init(self, **kvargs):" instead of "def __init__(self, **kvargs):" as you did in the classes Cat and Dog, yet Python did not return an error. Is the constructor different somehow because this subclass inherits from both Dog and Cat, or is this simply an acceptable alternative?
cyborgdale 5 months ago
@cyborgdale It's just an alternative
derekbanas 5 months ago
You are a great instructor. Have you thought of teaching classes?
ribsmcgee1 7 months ago
@ribsmcgee1 Thank you, but I dropped out of college in my 3rd year to go work for Apple. I never went back. I like having the freedom to teach whatever I want here. I'm glad you like the tutorials
derekbanas 7 months ago