problems, though, as it overloads the natural meaning of a function with an arbitrary convention. The programmer must remember specific failure values for many functions, which of course cannot be identical if the functions have different ranges. A different implementation of the same function may choose to use a different failure value, resulting in possible bugs when programmers move from environment to environment. If the failing function wishes to communicate useful information about why it had failed, one failure value is insufficient. A signed integer halves the possible index range to be able to store the sign bit. While the chosen value is an invalid result for this operation, it might be a valid input to followup operations. For example in Python str.find returns -1 if the substring is not found, but -1 is a valid index (negative indices generally start from the end). Multivalued return Many languages allow, through one mechanism or another, a function to return multiple values. If this is available, the function can be redesigned to return a boolean value signalling success or failure, in addition to its primary return value. If multiple error modes are possible, the function may instead return an enumerated return code (error code) in addition to its primary return value. Various techniques for returning multiple values include: Returning a tuple of values. This is conventional in languages such as Python, that have a built-in tuple data type, and special syntax for handling these: in Python, calls the function which returns a pair of values, and assigns the elements of the pair to two variables. Secondary return values as in Common Lisp. All expressions have a primary value, but secondary values might be returned to interested callers. For example, the GETHASH function returns the value of the given key in an associative map, or a default value otherwise. However, it also returns a secondary boolean indicating whether the value was found, making it possible to distinguish between the "no value was found" and "the value found was equal to default value" cases. This is different from returning a tuple, in that secondary return values are optional – if a caller does not care about them, it may ignore them completely, whereas tuple-valued returns are merely syntactic sugar for returning and unpacking a list, and every caller must always know about and consume all items returned. Languages with call by reference – or