Skip to content

Commit 3bf46dd

Browse files
committed
docs fixes for group_keys_by_replica
1 parent e8b61b5 commit 3bf46dd

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

cassandra/metadata.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2576,15 +2576,17 @@ def _cql_from_cass_type(cass_type):
25762576

25772577
def group_keys_by_replica(session, keyspace, table, keys):
25782578
"""
2579-
Returns a :class:`collections.defaultdict` with the keys grouped per host. This can be
2579+
Returns a :class:`dict` with the keys grouped per host. This can be
25802580
used to more accurately group by IN clause or to batch the keys per host.
25812581
25822582
If a valid replica is not found for a particular key it will be grouped under
25832583
:class:`~.NO_VALID_REPLICA`
25842584
25852585
Example usage::
2586-
result = group_keys_by_host(session, "system", "peers",
2587-
("peer", "data_center"), (("127.0.0.1", ), ("127.0.0.2", )))
2586+
result = group_keys_by_host(
2587+
session, "system", "peers",
2588+
(("127.0.0.1", ), ("127.0.0.2", ))
2589+
)
25882590
"""
25892591
cluster = session.cluster
25902592

0 commit comments

Comments
 (0)