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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:48:36+00:00 2026-06-09T00:48:36+00:00

Possible Duplicate: Python init and self what do they do? Can anyone explain what

  • 0

Possible Duplicate:
Python init and self what do they do?

Can anyone explain what __init__(self) does? I’ve been reading other questions and people mentioning super classes? What’s a super class? I thought procedures were supposed to start off with

def print_word(word):
    print word

Is __init__(self) some sort of special case since it has underscores and “self”? sorry for the lack of specific terminology… still learning.

  • 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-09T00:48:39+00:00Added an answer on June 9, 2026 at 12:48 am

    __init__(self) is a special function used within what are called “classes”. Classes let you define your own datatypes/object and this __init__ function is called when ever you create a new instance of the datatype/object that you’ve defined. It’s like saying “hey, every time you make one of these things, make sure you run this code too”. In object oriented programming, we call this kind of function a “constructor”. It’s a function that’s used to “construct” a new object. The self is a reference to the object that’s actually being created. In other words, the object is technically already created by the time you get to your __init__ function. __init__ just gives you the opportunity to initializes various aspects of your object (hence the name __init__).

    Python is a mixture of both functional, procedural, and object oriented paradigms. This __init__ business has to do with objects. For more information on object oriented programming you can checkout the wikipedia article.

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

Sidebar

Related Questions

Possible Duplicate: “Least Astonishment” in Python: The Mutable Default Argument Can anyone explain the
Possible Duplicate: [python]: path between two nodes Can anyone point me to some resources
Possible Duplicate: Can Super deal with multiple inheritance? Python inheritance? I have a class
Possible Duplicate: Python - '>>' operator What does the >> operator means in Python?
Possible Duplicate: Python float - str - float weirdness Python float division does not
Possible Duplicate: Why aren't Python's superclass init methods automatically invoked? For example: class Pet(object):
Possible Duplicate: Special (magic) methods in Python who can tell me what can call
Possible Duplicate: Python “extend” for a dictionary I know that Python list can be
Possible Duplicate: How does Python compare string and int? An intern was just asking
Possible Duplicate: Python import MySQLdb error - Mac 10.6 I've tried everything I can

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.