def current_umask():
 mask = os.umask(0)
 os.umask(mask)
 return mask

def current_umask ( ) : mask = os . umask ( 0 ) os . umask ( mask ) return mask
get the current umask which involves having to set it temporarily .