CommentForest is an iterable used by Comment and Submission
containing the replies and comment threads. The items can be iterated over just like any other listing, which could
contain either Comment or MoreComments.
Return the item at position index in the list.
index (int) – The item’s index.
item – The searched item.
Permit Listing to operate as an iterator.
self – The iterator.
Return the number of items in the Listing.
len – The number of items in the listing.
Permit Listing to operate as a generator.
item – The next item in the listing.
Fetch this item’s information from a suitable API endpoint.
self – The updated model.
Get the ID prepended with its kind.
fullname – The item’s ID prepended with its kind such as t1_.
Return the last item in the listing.
item – The last item in the listing.
Replaces all the MoreComments instances with the comments they reference.
This method can be used to retrieve all the comments, and only comments within a forest. This task could take a
while for larger threads, after which the comment forest can be iterated over and all the comments with their
replies will be made available.