News for hackers. Stuff that matters.
Re:PHP: A fractal of bad design by anthonyb on Tuesday April 10, 2012 @09:48PM (#3825521)
Why would you do that? You're going to have to have a branch to deal with the -1 further down in your code anyway. Why not just deal with it when it happens:

  if value not in list:
      # value not found
      return
  index = list.index(value)
  # Code to deal with the thing

There are no comments on this comment yet.