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 7029759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:34:50+00:00 2026-05-28T00:34:50+00:00

I am working with a class and am trying to call a helper method

  • 0

I am working with a class and am trying to call a helper method from within the class. I got the following code to work, but I am unsure why I have to pass “self” as an argument to the helper function when I call it when I already have “self” as an argument in the method. Is there a reason that I have to pass it as an argument when I call Frequency.__helper(self, record) in the example below?

Thanks!

class Frequency:

    def __init__(self, record):
        self.record = record

    def __helper(self, datalist)
        do something to datalist...

    def getFreq(self):
        allrec = self.record
        record = allrec[1].split(' ')
        var = Frequency.__helper(self, record)
        return var
  • 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-28T00:34:51+00:00Added an answer on May 28, 2026 at 12:34 am

    The right way to call the method is just

    var = self.__helper(record)
    

    That does the same thing, but in a more intuitive fashion.

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

Sidebar

Related Questions

I'm working with java, trying to use the AudioFormat Class. I have the following
I'm trying to call a class (main method) from command line (Windows) with Java.
I'm working on a class that inherits from another class, but I'm getting a
I am working with ASP.net. I am trying to call a method that exists
This is my model and I'm trying to call self.red but it's not working.
I'm working on this website, trying to call a function from a C# DLL
I'm trying to call a function in one child class (Circle.as) from another child
I'm trying to work out what's not working in this code: #!/usr/bin/python import cmd
I'm trying to call my java class from c++ (ms vc 2008) with JNI,
I am trying to call another function, foo(), in the Raw class from main.cpp

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.