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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:17:43+00:00 2026-05-30T18:17:43+00:00

Possible Duplicate: Special (magic) methods in Python who can tell me what can call

  • 0

Possible Duplicate:
Special (magic) methods in Python
who can tell me what can call the built-in functions in next code

I have being using python and every now and then I discover an implicit class method of the type __xyz__ which holds a special meaning and is over-rided for custom usages.

For example:

class some_class:
    def __init__(self):
        # Everyone knows about this. [ Constructor ]
        pass

    def __str__(self):
        # string representation of object I suppose.
        pass

    def __unicode__(self):
        # Unicode representation of object I guess
        pass

    def __del__(self):
        # Similar to destructor
        pass

These all available over-ridables are useful, but I am not able to find how to refer them or find a documentation of all such available __xyz__ types available in a python class.

What all __xyz__ stuff is available and how do you use them to make your life easy ?

What is the pythonic zen behind this ?
What are the analogous counterparts in other languages such as C++ ?

  • 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-30T18:17:44+00:00Added an answer on May 30, 2026 at 6:17 pm

    The possible names are described in section 3.4 of the Python language specification.

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

Sidebar

Related Questions

Possible Duplicate: Python urllib2 Progress Hook I have a script which uploads a file
Possible Duplicate: error when uploading string with special characters I have a string say
Possible Duplicate: ASP.NET “special” tags What is the difference between <%# ... %> ,
Possible Duplicate: How does the Google Did you mean? Algorithm work? Suppose you have
Possible Duplicate: What is the best way to remove accents in a python unicode
Possible Duplicate: How to clone ArrayList and also clone its contents? I have a
Possible Duplicate: php using special symbols (<?php echo $row_pageDetails['profile']; ?>) If profile is empty
Possible Duplicate: how to replace special characters with the ones they're based on in
Possible Duplicate: ASP.NET “special” tags Is there a proper name for <%...> in ASP.NET,
Possible Duplicate: Explain JavaScript's encapsulated anonymous function syntax I have just read a javascript

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.