def getwriter(encoding):
 return lookup(encoding).streamwriter

def getwriter ( encoding ) : return lookup ( encoding ) . streamwriter
lookup up the codec for the given encoding and return its streamwriter class or factory function .