title: Python Google App Engine: A better way of saying, "If an object does not exist in the datastore, do something"?
body: <p>I am asking because the way I have it right now seems really strange. Basically, I am saying, "If there is an exception thrown, do something. Else, do nothing." Here is some sample code: </p>
  
  <pre><code> try:
          db.get(db.Key(uid))
   except:
          newUser = User(key_name=str(uid)) 
          newUser.first_name = self.request.get("first")
          newUser.last_name = self.request.get("last")
          newUser.email = self.request.get("email") 
          newUser.phone = self.request.get("phone")
          db.put(newUser)
  </code></pre>
  
  <p>Thanks! </p>