+ 2

Built in functions

We define a function by coding it; but do built in functions also have a definition in code? I wanna know so i can understand functions completely

31st Mar 2023, 3:49 PM
Shahin Kh
Shahin Kh - avatar
5 Respuestas
+ 12
Shahin Kh , each function, method, class, ... is build from code. > unlike self-written functions, we cannot necessarily see built-in functions in the source code.
31st Mar 2023, 3:56 PM
Lothar
Lothar - avatar
+ 5
Lothar thanks
31st Mar 2023, 3:59 PM
Shahin Kh
Shahin Kh - avatar
+ 5
Also, many, if not all, Python builtin functions are written in Python itself, so you can read them in your operating system libraries directories
31st Mar 2023, 11:04 PM
Emerson Prado
Emerson Prado - avatar
+ 1
Emerson Prado Python built-in functions are written in C. They are then complied into the python interpreter. But there are equivalents in python's standard library, which are written in Python.
31st Mar 2023, 11:54 PM
Chris Coder
Chris Coder - avatar
+ 1
Interesting to read the distinction. For the curious, the official Python code repositories: https://github.com/python
1st Apr 2023, 12:10 AM
Emerson Prado
Emerson Prado - avatar