def _cap_first(s: str) -> str:
    """Returns string with first character capitalized. Why this isn't in
    the Python stdlib is beyond me. The capitalize() function annoyingly
    lowercases the rest of the string."""
    return s[:1].upper() + s[1:] if s else s