def refresh(self):
        """Re-query to update object with latest values. Return the object.

        Any listing, such as the submissions on a subreddits top page, will
        automatically be refreshed serverside. Refreshing a submission will
        also refresh all its comments.

        In the rare case of a comment being deleted or removed when it had
        no replies, a second request will be made, not all information will
        be updated and a warning will list the attributes that could not be
        retrieved if there were any.

        """
        unique = self.reddit_session._unique_count  # pylint: disable=W0212
        self.reddit_session._unique_count += 1  # pylint: disable=W0212

        if isinstance(self, Redditor):
            other = Redditor(self.reddit_session, self._case_name, fetch=True,
                             uniq=unique)
        elif isinstance(self, Comment):
            sub = Submission.from_url(self.reddit_session, self.permalink,
                                      params={'uniq': unique})
            if sub.comments:
                other = sub.comments[0]
            else:
                # comment is "specially deleted", a reddit inconsistency;
                # see #519, #524, #535, #537, and #552 it needs to be
                # retreived via /api/info, but that's okay since these
                # specially deleted comments always have the same json
                # structure. The unique count needs to be updated
                # in case the comment originally came from /api/info
                msg = ("Comment {0} was deleted or removed, and had "
                       "no replies when such happened, so a second "
                       "request was made to /api/info.".format(self.name))
                unique = self.reddit_session._unique_count
                self.reddit_session._unique_count += 1
                other = self.reddit_session.get_info(thing_id=self.name,
                                                     params={'uniq': unique})
                oldkeys = set(self.__dict__.keys())
                newkeys = set(other.__dict__.keys())
                keydiff = ", ".join(oldkeys - newkeys)
                if keydiff:
                    msg += "\nCould not retrieve:\n{0}".format(keydiff)
                self.__dict__.update(other.__dict__)  # pylint: disable=W0201
                warn(msg, RuntimeWarning)
                return self
        elif isinstance(self, Multireddit):
            other = Multireddit(self.reddit_session, author=self._author,
                                name=self.name, uniq=unique, fetch=True)
        elif isinstance(self, Submission):
            params = self._params.copy()
            params['uniq'] = unique
            other = Submission.from_url(self.reddit_session, self.permalink,
                                        comment_sort=self._comment_sort,
                                        params=params)
        elif isinstance(self, Subreddit):
            other = Subreddit(self.reddit_session, self._case_name, fetch=True,
                              uniq=unique)
        elif isinstance(self, WikiPage):
            other = WikiPage(self.reddit_session,
                             six.text_type(self.subreddit), self.page,
                             fetch=True, uniq=unique)

        self.__dict__ = other.__dict__  # pylint: disable=W0201
        return self
Re-query to update object with latest values. Return the object.

        Any listing, such as the submissions on a subreddits top page, will
        automatically be refreshed serverside. Refreshing a submission will
        also refresh all its comments.

        In the rare case of a comment being deleted or removed when it had
        no replies, a second request will be made, not all information will
        be updated and a warning will list the attributes that could not be
        retrieved if there were any.

        
rtv/packages/praw/objects.py