I tried to call a function on a child, that calls the parent and uses the self attribute. It wasn't having it.
I got the error
AttributeError: Class Instance has no Attribute '
After some searching I came across this post, it was a little confusing but I think I finally got it.
Here is an example of the result in action:
*Notice I had to do Animal.__init__(self) for the function to work. It took me quite a while to figure this one out.
Post a Comment