2

I wanted to know how the max() builtin function works. So I tried to read the source code at svn.python.org, but I couldn't find the __builtin__ module. It should be in __builtin__.py, right?

Can somebody tell me where to find the source code for this module? Is this available in ubuntu linux (which has the 2.6 version)?

3

1 Answer 1

4

__builtin__ as its name implies, refers to the special module containing functions and classes built in to the language itself. The implementation of these functions is in C, not Python. (Specifically, in the bltinmodule.c source file.)

Sign up to request clarification or add additional context in comments.

2 Comments

See the "builtin_max" function
Here's the link to builtin_max in the 2.6.8 hg repo. min_max starts at line 1336.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.