getting the attribute hits from a ResultSet results in inconsistent behaviour

When you attempt to get the attribute hits from a result set, the __getattr__ method is called which in turn runs _do_search if there are no results and then proceeds on to get the attribute "hits", which is a dictionary.
When you run it for a 2nd time resultset.hits returns the proper value, which is a list. The reason for this is because _do_search sets the hits attribute on the resultset.