Index: C:/checkout/ldev_glamisu/django/django/db/models/query.py =================================================================== --- C:/checkout/ldev_glamisu/django/django/db/models/query.py (revision 4537) +++ C:/checkout/ldev_glamisu/django/django/db/models/query.py (working copy) @@ -111,6 +111,8 @@ assert (not isinstance(k, slice) and (k >= 0)) \ or (isinstance(k, slice) and (k.start is None or k.start >= 0) and (k.stop is None or k.stop >= 0)), \ "Negative indexing is not supported." + if not isinstance(k, (slice, int)): + raise TypeError, "Specify an integer index or a slice" if self._result_cache is None: if isinstance(k, slice): # Offset: