rackspace/pyrax — pull request #477 by jaraco (2014-10-05 15:37:26+00:00)
Title: Support body.keys() when it returns an iterable instead of a list (Python 3). Fixes #476.

I believe this approach is sound. It will raise a StopIteration instead of a KeyError if `keys()` is empty, but I suspect the actual exception in that case is not important. If it's important to keep that behavior, an alternative approach would be to cast the result of `keys()` to a list before dereferencing the first element.