def _unicode_letters_generator():
    """Generates unicode characters in the letters category

    :return: a generator which will generates all unicode letters available

    """
    if sys.version_info[0] == 2:
        chr_function = unichr  # pylint:disable=undefined-variable
        range_function = xrange  # pylint:disable=undefined-variable
    else:
        chr_function = chr
        range_function = range  # pylint:disable=redefined-variable-type

    # Use sys.maxunicode instead of 0x10FFFF to avoid the exception below, in a
    # narrow Python build (before Python 3.3)
    # ValueError: unichr() arg not in range(0x10000) (narrow Python build)
    # For more information, read PEP 261.
    for i in range_function(sys.maxunicode):
        char = chr_function(i)
        if unicodedata.category(char).startswith('L'):
            yield char
dataset/ETHPy150Open omaciel/fauxfactory/fauxfactory/__init__.py/_unicode_letters_generator/original