from typing import Callable


def _make_number_parser(decimal: str) -> Callable[[str], float]:
    """ Helper to create a number parser with a potentially custom
        decimal separator. When this is not the '.' character, each
        number will replace the given decimal separator with '.'
        before calling the built-in `float` function.
    """
    if decimal == '.':
        return float

    def inner(value: str) -> float:
        return float(value.replace(decimal, '.'))

    return inner