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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:42:20+00:00 2026-06-16T00:42:20+00:00

Many built-in libraries use C implementations whenever possible. For example, heapq uses lib-dynload/_heapq.so if

  • 0

Many built-in libraries use C implementations whenever possible.

For example, heapq uses lib-dynload/_heapq.so if it’s available.

Where can I find source code of modules like _heapq?

  • 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-16T00:42:21+00:00Added an answer on June 16, 2026 at 12:42 am

    To see the code for any version of CPython, go to:

    • http://hg.python.org/cpython/file/3.3/

    Replace the 3.3 with 3.2, 2.3, whatever for older versions. You can also explicitly put an hg revision number instead of a major.minor version, if you know what you’re looking for.

    The C modules are mostly inside the Modules subdirectory, and each one is generally named foo.c or foomodule.c, while the Python libraries are in the Lib subdirectory, named foo.py.

    In the case of heapq, the actual heapq module is in Python (Lib/heapq.py), but it uses a C module named _heapq (Modules/_heapqmodule.c).

    Of course you can also download the source. On the front page of http://python.org there are “Quick Links” for “Source Distribution” for the latest 2.x and 3.x versions, or you can click Download for all the other releases. The structure is, as you’d expect, the same thing you see at http://hg.python.org.

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

Sidebar

Related Questions

There are so many html and xml libraries built into python , that it's
My program (a console application) references several other assemblies (many open-source libraries). I built
i know that in Java you can use their built-in APIs for design pattern.
i want to use Ant task to compile flex project(with many libraries, modules) i
I have many libraries that are built using .Net 2.0 and 3.5 I now
Sublime Text 2 comes with many built-in completions/templates for common idioms. In C++, these
my team have built many tools for our project using win forms and Visual
I want to count how many times i built on VS.NET . I have
I have a site built in Ruby On Rails which has many ads in
All the Python built-ins are subclasses of object and I come across many user-defined

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.