Skip to content

function signature

A function signature is the combination of a function’s name and the parameters it accepts, which together specify how the function is called. In statically typed languages, the signature also records the type of each parameter and often the return type, so it doubles as the function’s type-level contract.

The exact components that count as part of a signature vary by language. C++ and Java, for example, include the parameter types but exclude the return type, because the signature is what distinguishes one overloaded function from another that shares its name. A compiler often encodes the signature into a mangled symbol name so the linker can tell those overloads apart.

A signature generally captures the following:

  • Name: The identifier a caller uses to invoke the function.
  • Parameters: The number of parameters the function accepts and the order they appear in.
  • Parameter types: The type each parameter expects, in languages that track types.
  • Return type: The type of the value handed back, where the language treats it as part of the signature.

The signature is the public interface a caller depends on, so changing it can break existing calls. Type checkers, editor autocompletion, and generated documentation all read signatures to verify and describe how a function is used. In dynamically typed languages such as Python, the signature is the name and parameter structure alone, with optional type hints supplying the type detail that static languages keep built in.

Defining Your Own Python Function

Tutorial

Defining Your Own Python Function

Learn how to define your own Python function, pass data into it, and return results to write clean, reusable code in your programs.

basics python

For additional information on related topics, take a look at the following resources:


By Martin Breuss • Updated July 19, 2026