# Buggy code
def __init__(
    self,
    reddit: "Reddit",
    _data: Dict[str, Any] = None,
    collection_id: Optional[str] = None,
    permalink: Optional[str] = None,
):
    """Initialize this collection.

    :param reddit: An instance of :class:`.Reddit`.
    :param _data: Any data associated with the Collection (optional).
    :param collection_id: The ID of the Collection (optional).
    :param permalink: The permalink of the Collection (optional).
    """
    super().__init__(reddit, _data)

    if (_data, collection_id, permalink).count(None) != 2:
        raise TypeError(
            "Exactly one of _data, collection_id, or permalink must be provided."
        )

    if permalink is not None:
        collection_id = self._url_parts(permalink)[4]

    if collection_id is not None:
        self.collection_id = collection_id  # set from _data otherwise

    self._info_params = {
        "collection_id": self.collection_id,
        "include_links": True,
    }


# Traceback (RecursionError)
Traceback (most recent call last):
  File "C:\00. Datos\90. Descargas\claimdoneremover-master (1)\claimdoneremover-master\cdremover\main.py", line 49, in <module>
    for comment in reddit.redditor(user).comments.new(limit=limit):
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\util\cache.py", line 39, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\listing\mixins\redditor.py", line 47, in comments
    return SubListing(self._reddit, self._path, "comments")
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 122, in _path
    return API_PATH["user"].format(user=self)
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\base.py", line 61, in __str__
    return getattr(self, self.STR_FIELD)
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\base.py", line 34, in __getattr__
    self._fetch()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 171, in _fetch
    data = self._fetch_data()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 166, in _fetch_data
    name, fields, params = self._fetch_info()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 163, in _fetch_info
    return ("user_about", {"user": self.name}, None)
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\base.py", line 34, in __getattr__
    self._fetch()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 171, in _fetch
    data = self._fetch_data()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 166, in _fetch_data
    name, fields, params = self._fetch_info()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 163, in _fetch_info
    return ("user_about", {"user": self.name}, None)
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\base.py", line 34, in __getattr__
    self._fetch()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 171, in _fetch
    data = self._fetch_data()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 166, in _fetch_data
    name, fields, params = self._fetch_info()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 163, in _fetch_info
    return ("user_about", {"user": self.name}, None)
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\base.py", line 34, in __getattr__
    self._fetch()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 171, in _fetch
    data = self._fetch_data()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 166, in _fetch_data
    name, fields, params = self._fetch_info()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 163, in _fetch_info
    return ("user_about", {"user": self.name}, None)
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\base.py", line 34, in __getattr__
    self._fetch()

...

  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 171, in _fetch
    data = self._fetch_data()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 166, in _fetch_data
    name, fields, params = self._fetch_info()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 163, in _fetch_info
    return ("user_about", {"user": self.name}, None)
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\base.py", line 34, in __getattr__
    self._fetch()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 171, in _fetch
    data = self._fetch_data()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 166, in _fetch_data
    name, fields, params = self._fetch_info()
  File "C:\Users\Andres\AppData\Local\Programs\Python\Python37-32\lib\site-packages\praw\models\reddit\redditor.py", line 161, in _fetch_info
    if hasattr(self, "_fullname"):
RecursionError: maximum recursion depth exceeded while calling a Python object

# Fixed code
def __init__(
    self,
    reddit: "Reddit",
    _data: Dict[str, Any] = None,
    collection_id: Optional[str] = None,
    permalink: Optional[str] = None,
):
    """Initialize this collection.

    :param reddit: An instance of :class:`.Reddit`.
    :param _data: Any data associated with the Collection (optional).
    :param collection_id: The ID of the Collection (optional).
    :param permalink: The permalink of the Collection (optional).
    """
    if (_data, collection_id, permalink).count(None) != 2:
        raise TypeError(
            "Exactly one of _data, collection_id, or permalink must be provided."
        )

    if permalink:
        collection_id = self._url_parts(permalink)[4]

    if collection_id:
        self.collection_id = collection_id  # set from _data otherwise

    super().__init__(reddit, _data)

    self._info_params = {
        "collection_id": self.collection_id,
        "include_links": True,
    }