countrynames/__init__.py
def to_code_3(country_name: Any, fuzzy: bool = False) -> Optional[str]:
    """Given a human name for a country, return a three letter code.

    Arguments:
        ``fuzzy``: Try fuzzy matching based on Levenshtein distance.
    """
    code = to_code(country_name, fuzzy=fuzzy)
    if code and len(code) > 2:
        return code
    elif code is None:
        return code
    else:
        return mappings[code]
Given a human name for a country, return a three letter code.

    Arguments:
        ``fuzzy``: Try fuzzy matching based on Levenshtein distance.
    
Given a human name for a country, return a three letter code.
Given a human name for a country return a three letter code .
def to_code_3(country_name: Any, fuzzy: bool = False) -> Optional[str]:
    code = to_code(country_name, fuzzy=fuzzy)
    if code and len(code) > 2:
        return code
    elif code is None:
        return code
    else:
        return mappings[code]
def to_code_3 ( country_name : Any , fuzzy : bool = False ) -> Optional [ str ] : code = to_code ( country_name , fuzzy = fuzzy ) if code and len ( code ) > 2 : return code elif code is None : return code else : return mappings [ code ]
Given a human name for a country, return a three letter code.
Given a human name for a country return a three letter code .
"""Given a human name for a country, return a three letter code.

    Arguments:
        ``fuzzy``: Try fuzzy matching based on Levenshtein distance.
    """
country_name
Any
fuzzy
bool
``fuzzy``
Try fuzzy matching based on Levenshtein distance.
Try fuzzy matching based on Levenshtein distance .