user4071254
user4071254

Reputation:

How can I see Python's __builtins__ source code?

Can I get python to print the source code for __builtins__ directly?

OR (more preferably):

What is the pathname of the source code for __builtins__?


I at least know the following things:

Upvotes: 3

Views: 1492

Answers (2)

user2357112
user2357112

Reputation: 280564

The __builtin__ module is implemented in Python/bltinmodule.c, a rather unusual location for a rather unusual module.

Upvotes: 6

David P.
David P.

Reputation: 125

I can't try it right now, but python default ide is able to open core modules easily (I tried with math and some more)

https://docs.python.org/2/library/idle.html

On menus. Open module.

Upvotes: -2

Related Questions