Then, if spec can be empty (this is not clear yet) I would rather avoid the switch using something like: 
```
min_val = 4
max_arity = max([min_val] + list(map(len, s) for s in s.itervalues()))
```

(I don't know why the two max() in the original code)