Use structures or named tuples for passing results like this:
https://github.com/datastax/python-driver/pull/609#discussion_r69896936
Also, requests like this:
https://github.com/datastax/python-driver/blob/3.5.0/cassandra/connection.py#L456
Some good candidates for this:
The tuples in connection.Connection._requests's values (linked above)
The tuples returned by cluster.ResponseFuture.result (linked above)
The tuples returned by pool.HostConnection.borrow_connection
We've taken a (very slightly) different approach in the DSE driver. Compare this C* driver code to its counterpart in the DSE driver codebase – the DSE driver sets values on a ResultMessage object that gets passed around.
Example patch for this, found during cleanup of some old branches:
The code changed a bit since the ticket creation. It is still valid for:
connection.Connection._request
pool.HostConnection.borrow_connection
I don't think this need to be done in a major.