# Buggy code
def post(
    self,
    path: str,
    data: Optional[Union[Dict[str, Union[str, Any]], bytes, IO, str]] = None,
    files: Optional[Dict[str, IO]] = None,
    params: Optional[Union[str, Dict[str, str]]] = None,
) -> Any:
    """Return parsed objects returned from a POST request to ``path``.

    :param path: The path to fetch.
    :param data: Dictionary, bytes, or file-like object to send in the body
        of the request (default: None).
    :param files: Dictionary, filename to file (like) object mapping
        (default: None).
    :param params: The query parameters to add to the request (default:
        None).

    """
    data = self.request("POST", path, data=data or {}, files=files, params=params)
    return self._objector.objectify(data)


# Traceback (APIException)
---------------------------------------------------------------------------
APIException                              Traceback (most recent call last)
<ipython-input-14-5b88e4f8d60d> in <module>
1 while True:
----> 2     print(repr(s[1].reply("F")))
3

/usr/local/lib/python3.7/site-packages/praw/models/reddit/mixins/replyable.py in reply(self, body)
31         """
32         data = {"text": body, "thing_id": self.fullname}
---> 33         comments = self._reddit.post(API_PATH["comment"], data=data)
34         try:
35             return comments[0]

/usr/local/lib/python3.7/site-packages/praw/reddit.py in post(self, path, data, files, params)
553             "POST", path, data=data or {}, files=files, params=params
554         )
--> 555         return self._objector.objectify(data)
556
557     def put(

/usr/local/lib/python3.7/site-packages/praw/objector.py in objectify(self, data)
168             errors = data["json"]["errors"]
169             if len(errors) == 1:
--> 170                 raise APIException(*errors[0])
171             assert not errors
172         elif isinstance(data, dict):

APIException: RATELIMIT: 'you are doing that too much. try again in 5 seconds.' on field 'ratelimit'

# Fixed code
def post(
    self,
    path: str,
    data: Optional[Union[Dict[str, Union[str, Any]], bytes, IO, str]] = None,
    files: Optional[Dict[str, IO]] = None,
    params: Optional[Union[str, Dict[str, str]]] = None,
) -> Any:
    """Return parsed objects returned from a POST request to ``path``.

    :param path: The path to fetch.
    :param data: Dictionary, bytes, or file-like object to send in the body
        of the request (default: None).
    :param files: Dictionary, filename to file (like) object mapping
        (default: None).
    :param params: The query parameters to add to the request (default:
        None).

    """
    data = data or {}
    try:
        return self._objectify_request(
            data=data,
            files=files,
            method="POST",
            params=params,
            path=path,
        )
    except RedditAPIException as exception:
        seconds = self._handle_rate_limit(exception=exception)
        if seconds is not None:
            logger.debug("Rate limit hit, sleeping for {:.2f} seconds".format(seconds))
            time.sleep(seconds)
            return self._objectify_request(
                data=data,
                files=files,
                method="POST",
                params=params,
                path=path,
            )
        raise