Skip to content

Commit

Permalink
Merge pull request #980 from Watchful1/patch-2
Browse files Browse the repository at this point in the history
Add an example of the skip_existing argument to the comment stream docs
  • Loading branch information
bboe committed Nov 18, 2018
2 parents b825f10 + 95ec577 commit 467cd4b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions praw/models/reddit/subreddit.py
Expand Up @@ -1841,6 +1841,15 @@ def comments(self, **stream_options):
for comment in reddit.subreddit('iama').stream.comments():
print(comment)
To only retreive new submissions starting when the stream is
created, pass `skip_existing=true`:
.. code:: python
subreddit = reddit.subreddit('iama')
for comment in subreddit.stream.comments(skip_existing=true):
print(comment)
"""
return stream_generator(self.subreddit.comments, **stream_options)

Expand Down

0 comments on commit 467cd4b

Please sign in to comment.