I'd just break this into two lines since we only use url_format once:

``` python

              return "http://www.gravatar.com/avatar/%s?%s" % (
                  hash, query_string)
```