Isn't this whole `if` ... `elif` sequence equivalent to just one check?:

```python
res = resource['resource']
if PREDICTION_RE.match(res):
  ### same as in your code
else
  obj = resource['object']
  out.write("%s (%s bytes)\n" % (obj['name'], obj['size'])
```

(supposing that `res` always matches one of the REs... otherwise one can change the `else` for an `elif`
constructing previously a `NON_EVALUATION_RE` (although my guess is that probably here it doesn't matter much)