(op)
return error and error.get('code', 0) == 1
Return whether the operation was canceled by the user.
Return whether the operation was canceled by the user.
Return whether the operation was canceled by the user .
def is_canceled(op):
  """Return whether the operation was canceled by the user."""
  error = get_error(op)
  return error and error.get('code', 0) == 1
def is_canceled ( op ) : error = get_error ( op ) return error and error . get ( 'code' , 0 ) == 1