mLewisLogic/foursquare — pull request #2 by beichhor (2012-03-29 01:39:42+00:00)
Title: Multi generator doesn't drop responses

Hi Mike

Nice work on the generator, although I've come up with an issue in my testing. I don't really like the way the generator throws an exception half way through processing a bunch of responses because it is possible that there is some remaining 200 responses which are valid, and that I'm interested in. So I've implemented a way to store the responses if an exception is thrown durning the yield section, and recover on a subsequent generator call. Although it's not ideal as you then need to iterate using an inner and outer loop:

```python
while len(client.multi):
try:
for response in client.multi():
print response
except Exception, e:
print e
```

Unless you have a better idea?

Benn