Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6021097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:39:47+00:00 2026-05-23T03:39:47+00:00

In the below sample, the last 2 lines in the B.Go() method both call

  • 0

In the below sample, the last 2 lines in the B.Go() method both call the Go() method from class A. Are they functionally identical? Is the only benefit to using super() that I don’t have to know the inherited class name?

class A(object):
    def Go(self):
        print "Calling A.Go()"

class B(A):
    def Go(self):
        super(B, self).Go()
        A.Go(self)

inst = B()
inst.Go()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:39:48+00:00Added an answer on May 23, 2026 at 3:39 am

    No, super() does something a direct call to A.Go can’t. super(B, self).Go() calls the next method in the method resolution order. It calls the method that would have been called had B not implemented the method at all. In direct linear inheritance this is always A, so there is no real difference (besides the class you repeat.) In the case of multiple inheritance, however, the next class in the normal method resolution order is not necessarily the direct baseclass of the current class. See the explanation for diamond inheritance in Guido’s original explanation of these features.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the below code sample, what does {0:X2} mean? This is from the reflection
I have a IObservable [named rows in the sample below] from Reactive extensions framework
Hi below is the data sample for chart data which I read from URL
Below is sample code to create a radio button element with Yes/No options in
I've put together a small code-sample below (Currently in C# 3.5 but would also
I've been learning C#, and I'm trying to understand lambdas. In this sample below,
In the sample code below I am dividing by zero which when I step
The code below shows a sample that I've used recently to explain the different
Below I have written a sample program that I have written to learn about
Given the sample console application below: QUESTION #1 : Why does .Name() return typeof

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.