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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:10:19+00:00 2026-05-28T22:10:19+00:00

I was curious about the __builtin__ module and how it’s used, but I can’t

  • 0

I was curious about the __builtin__ module and how it’s used, but I can’t find it in Python3! Why was it moved?

Python 2.7

>>> import __builtin__
>>>

Python 3.2

>>> import __builtin__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named __builtin__
>>>
  • 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-28T22:10:20+00:00Added an answer on May 28, 2026 at 10:10 pm

    The __builtin__ module was renamed to builtins in Python3.

    This change solves 2 sources of confusion for the average Python developer.

    • Is it '__builtins__' or '__builtin__' that is in the global namespace?
      Darn s!
    • Is __builtin__ a special method name or a module? I can’t
      tell.

    This confusion mainly arises because of the violation of pep8 convention. Also, the lack of pluralization on the module hinders communication as well. Both of these are greatly illustrated by the lengths Guido must go to explain the following from http://mail.python.org/pipermail/python-ideas/2009-March/003821.html:

    [CPython] looks at the globals, which contain a special magic entry
    __builtins__ (with an ‘s’) which is the dict where built-in functions are looked up. When this dict is the same object as the default
    built-in dict (which is __builtin__.__dict__ where __builtin__ —
    without ‘s’ — is the module defining the built-in functions) it gives
    you supervisor privileges;…

    For example,

    Python2.7

    >>> import __builtin__
    >>> vars(globals()['__builtins__']) is vars(__builtin__)
    True
    >>> 
    

    Python3.2

    >>> import builtins
    >>> vars(globals()['__builtins__']) is vars(builtins)
    True
    >>>
    

    Related resources:

    Other name changes – http://docs.pythonsprints.com/python3_porting/py-porting.html#name-changes

    For a succinct explanation of how __builtins__ is used in name resolution – __builtin__ module in Python

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

Sidebar

Related Questions

I was curious about the performance of insert-sort using C and python but the
Well I was curious about this and searched for a while but couldn't find
I was just curious about the question, but couldn't find the answer in the
Just curious about the identifier used in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath I
Just curious about speed of Python and Java.. Intuitively, Python should be much slower
I am curious about how many of you folks incorporate mocking of objects (frameworks
I was curious about how other people use the this keyword. I tend to
I'm curious about people's approaches to using stored procedures in a database that is
I'm curious about OpenID. While I agree that the idea of unified credentials is
I am curious about how do you protect your software against cracking, hacking etc.

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.