This and the lines below can be simplified as:

```python
paste = Paste.get(delid)
if paste is None:
  return # or redirect?
memcache.delete(paste.id) # safe even if paste is not cached
paste.delete() # typesafe wrapper around db.delete
```