Search code examples
pythonindexingnosqlcassandrapycassa

Does pycassa's ColumnFamily.get_indexed_slices return a generator?


The documentation at [1] says that ColumnFamily.get_range() returns a python generator over (key, {column_name: column_value}). I wonder if ColumnFamily.get_indexed_slices() also returns a generator.

The documentation is a bit unclear about that.

[1] http://pycassa.github.com/pycassa/api/pycassa/columnfamily.html#pycassa.columnfamily.ColumnFamily.get_indexed_slices


Solution

  • Okay I realized it is a generator.

    >>> col_fam.get_indexed_slices(clause)
    <generator object get_indexed_slices at 0x1fdcf00>