function call
Running a function by writing its name followed by parentheses holding any arguments.
In more detail
When a call runs, the arguments are assigned to the parameters, the body executes, and the call is replaced by the returned value. Without the parentheses you only refer to the function and nothing runs. A call within the same program takes nanoseconds and cannot time out or half succeed, unlike a call over the network to another service.
Example
print(len("hello"))Related terms
- function — A named, reusable block of code that takes inputs, called arguments, and can return a result.
- argument — A value you pass to a function when you call it, written inside the parentheses of the call.
- return statement — The statement return expression, which ends a function call immediately and hands the value back to the caller.
- flow of control — The order in which a program's statements actually run, which jumps into functions, round loops and past if branches rather than going straight down the page.
- network call — A request sent to another process over a network, which can be slow, time out or partly succeed.
- monolith — An application built and deployed as a single unit, usually with one database.
Taught in
- What Python Is, And Where It Came From — Hands-on Python: Complete Video Course & Book
- First Run, And Fixing A Broken Install — Hands-on Python: Complete Video Course & Book
- Your Python Folder And A First Program — Hands-on Python: Complete Video Course & Book
- Function Parameters — Hands-on Python: Complete Video Course & Book
- Playing Computer — Hands-on Python: Complete Video Course & Book
- Objects, Methods And String Case — Hands-on Python: Complete Video Course & Book
- Monolith Versus Services: The Honest Trade Offs — Scalable System Design & Distributed Architecture
- Capacity Planning As A Design Input — Scalable System Design & Distributed Architecture