Is this proper behavior for a capturing regexp?

```
In [1]: import re
In [2]: r = re.compile(r'()(foo)()')
In [3]: r.match('foo').groups()
Out[5]: ('', 'foo', '')
```

FYI I'm abusing this so I can get a consistent amount of `.groups()` on a `match()`. Sue me.

#Python #regexps

@mdione If you're using it to compatibly index into different expressions' matches, you could try named groups instead. I think that'd be easier to read.

@chrysn yeah, no, not even my hack fixed it. The truth is, it was something like `(?:(moo)(foo)(bar)(quux)|()(foo)()())`, but when calling `match().groups()` I would either get:

`['moo', 'foo', 'bar', 'quux', None, None, None, None]` or
`[None, None, None, None, '', 'foo', '', '']`

instead of

`['moo', 'foo', 'bar', 'quux']` or
`['', 'foo', '', '']`

as I expected. The resulting code was even worse :)