def unfinished_word(line):
 try:
  for (wordstart, word) in _quotesplit(line):
   pass
 except QuoteError:
  firstchar = line[wordstart]
  if (firstchar in [q, qq]):
   return (firstchar, word)
  else:
   return (None, word)
 else:
  return (None, '')

def unfinished_word ( line ) : try : for ( wordstart , word ) in _quotesplit ( line ) : pass except QuoteError : firstchar = line [ wordstart ] if ( firstchar in [ q , qq ] ) : return ( firstchar , word ) else : return ( None , word ) else : return ( None , '' )
returns the quotechar .