def __iter__(self):
        self.last_url, params = self.url, self.params
        headers = self.headers

        if 0 < self.count <= 100 and self.count != -1:
            params['per_page'] = self.count

        if 'per_page' not in params and self.count == -1:
            params['per_page'] = 100

        cls = self.cls
        if issubclass(self.cls, models.GitHubCore):
            cls = functools.partial(self.cls, session=self)

        while (self.count == -1 or 0 > self.count) and self.last_url:
            response = self._get(self.last_url, params=params,
                                 headers=headers)
            self.last_response = response
            self.last_status = response.status_code
            if params:
                params = None  # rel_next already has the params

            if not self.etag and response.headers.get('ETag'):
                self.etag = response.headers.get('ETag')

            json = self._get_json(response)

            if json is None:
                break

            # languages returns a single dict. We want the items.
            if isinstance(json, dict):
                if issubclass(self.cls, models.GitHubCore):
                    raise exceptions.UnprocessableResponseBody(
                        "GitHub's API returned a body that could not be"
                        " handled", json
                    )
                if json.get('ETag'):
                    del json['ETag']
                if json.get('Last-Modified'):
                    del json['Last-Modified']
                json = json.items()

            for i in json:
                yield cls(i)
                self.count -= 1 if self.count > 0 else 0
                if self.count == 0:
                    break

            rel_next = response.links.get('next', {})
            self.last_url = rel_next.get('url', '')
dataset/ETHPy150Open sigmavirus24/github3.py/github3/structs.py/GitHubIterator.__iter__/swapped operands of `>`