def error_codes(*errnames):
 ans = {getattr(errno, x, None) for x in errnames}
 ans.discard(None)
 return ans

def error_codes ( * errnames ) : ans = { getattr ( errno , x , None ) for x in errnames } ans . discard ( None ) return ans
return error numbers for error names .