def __getitem__(self, key):
if isinstance(key, slice):<EOL><INDENT>return self._getslice(key)<EOL><DEDENT>if type(key) is not int:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>total = self._limit or self.feed.total_items<EOL>if key > total or key < -total:<EOL><INDENT>raise IndexError("<STR_LIT>")<EOL><DEDENT>if self._since or self._before:<EOL><INDENT>if key < <NUM_LIT:0>:<EOL><INDENT>key = key + total<EOL><DEDENT>items = ItemList(self.feed, before=self._before, since=self._since, limit=key + <NUM_LIT:1>, cached=self.feed.is_cached)<EOL>items = list(items)<EOL>return items[-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>if self._offset:<EOL><INDENT>if key >= <NUM_LIT:0>:<EOL><INDENT>key = self._offset + key<EOL><DEDENT>else:<EOL><INDENT>key = key + total + self._offset<EOL><DEDENT><DEDENT>elif key < <NUM_LIT:0>:<EOL><INDENT>key = key + total<EOL><DEDENT>item = ItemList(self.feed, limit=<NUM_LIT:1>, offset=key, stop=key + <NUM_LIT:1>, cached=self.feed.is_cached)<EOL>try:<EOL><INDENT>return item.next()<EOL><DEDENT>except StopIteration:<EOL><INDENT>raise IndexError("<STR_LIT>")<EOL><DEDENT><DEDENT>
This method has the same limitations as the method on :class:`Feed <pypump.models.feed.Feed>`

Additionally raises `PyPumpException` if an offset is specified as well as before/since.