Python: fixed index methods and added add_to_capped_collection.