Source code for aspis.common.identity
from typing import TypeVar
T = TypeVar("T")
[docs]
def identity(x: T) -> T:
"""
The identity function.
Args:
x (T): The value to be returned.
Returns:
T: The value passed as an argument.
Example:
>>> identity(5)
5
>>> identity([1, 2, 3])
[1, 2, 3]
"""
return x