def getincrementalencoder(encoding):
 encoder = lookup(encoding).incrementalencoder
 if (encoder is None):
  raise LookupError(encoding)
 return encoder

def getincrementalencoder ( encoding ) : encoder = lookup ( encoding ) . incrementalencoder if ( encoder is None ) : raise LookupError ( encoding ) return encoder
lookup up the codec for the given encoding and return its incrementalencoder class or factory function .