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

  • Home
  • SEARCH
  • 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 9020611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:03:51+00:00 2026-06-16T05:03:51+00:00

I have a problem and I can’t seem to find a solution. I have

  • 0

I have a problem and I can’t seem to find a solution. I have 3 classes A, B and C, with A being the superclass.

class A(object):
    def __str__(self):
        self._general_representation(str)

    def _general_representation(self,to_string):
        (nominal_value, std_dev) = (self._nominal_value, self.std_dev())

    def std_dev(self)
        a = error_components()*something

    def error_components(self):
        return something

class B(A):


class C(B):

I want class C to be able to override the std_dev() and error_components() of the ‘grandparent’ class. How can I do this? I can’t change class A and B. Is there a way to this in python 3.3?

  • 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-06-16T05:03:52+00:00Added an answer on June 16, 2026 at 5:03 am

    Just define them on class C. The functions are looked up on self, not on the class the calling method is defined in.

    class C(B):
        def std_dev(self)
            return self.error_components() * something + something_else_again
    
        def error_components(self):
            return something_entirely_different
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem which i can't seem to find the solution to. I
I have a problem and can't find a solution. I am making an accordion
I have another problem I can't seem to solve..., or find on this site...
I have a problem I can't seem to solve. I created a class function
I have a problem I can't seem to understand. In IE8 the directive ng-style
I have a problem I can't seem to fix. I have a big background
I have a problem i can't solve by myself and which I coudn't find
I have a problem I can't seem to sort out. I have a form
I seem to have a problem and can't get it work. I'm working on
I have a problem I can't find out myself so any help appreciated. I

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.