parameters: ()
docstring: Produces 5-byte sequences and defines whether they are valid UTF-8.
      We are more focused on the two first bytes, as they are crucial, the
      remaining bytes are either a valid ASCII or continuation byte.
docstring_summary: Produces 5-byte sequences and defines whether they are valid UTF-8.
      We are more focused on the two first bytes, as they are crucial, the
      remaining bytes are either a valid ASCII or continuation byte.
docstring_tokens: Produces 5 - byte sequences and defines whether they are valid UTF - 8 . We are more focused on the two first bytes as they are crucial the remaining bytes are either a valid ASCII or continuation byte .
function: def sequences():
      """
      Produces 5-byte sequences and defines whether they are valid UTF-8.
      We are more focused on the two first bytes, as they are crucial, the
      remaining bytes are either a valid ASCII or continuation byte.
      """
      def aux():
          ASCII = b'.'
          CONT  = b'\x80' # continuation byte
          for b0 in range(256):
              b0 = b0.to_bytes(1, 'little')
              for b1 in range(256):
                  b1 = b1.to_bytes(1, 'little')
                  yield (b0, b1, ASCII, ASCII, ASCII)
                  yield (b0, b1, CONT,  ASCII, ASCII)
                  yield (b0, b1, ASCII, CONT,  ASCII)
                  yield (b0, b1, CONT,  CONT,  ASCII)
                  yield (b0, b1, CONT,  CONT,  CONT)
  
      for seq in aux():
          bytes = b''.join(seq)
          try:
              str(bytes, encoding='utf8')
              yield (seq, True)
          except UnicodeError as e:
              yield (seq, False)
function_tokens: def sequences ( ) : def aux ( ) : ASCII = b'.' CONT = b'\x80' # continuation byte for b0 in range ( 256 ) : b0 = b0 . to_bytes ( 1 , 'little' ) for b1 in range ( 256 ) : b1 = b1 . to_bytes ( 1 , 'little' ) yield ( b0 , b1 , ASCII , ASCII , ASCII ) yield ( b0 , b1 , CONT , ASCII , ASCII ) yield ( b0 , b1 , ASCII , CONT , ASCII ) yield ( b0 , b1 , CONT , CONT , ASCII ) yield ( b0 , b1 , CONT , CONT , CONT ) for seq in aux ( ) : bytes = b'' . join ( seq ) try : str ( bytes , encoding = 'utf8' ) yield ( seq , True ) except UnicodeError as e : yield ( seq , False )