mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	queryset-refactor: Rewrote [7417] so that it involves less overall indentation.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7419 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -67,13 +67,13 @@ class _QuerySet(object): | ||||
|                 self._fill_cache() | ||||
|  | ||||
|     def __nonzero__(self): | ||||
|         if self._result_cache is None: | ||||
|             try: | ||||
|                 iter(self).next() | ||||
|             except StopIteration: | ||||
|                 return False | ||||
|             return True | ||||
|         return bool(self._result_cache) | ||||
|         if self._result_cache is not None: | ||||
|             return bool(self._result_cache) | ||||
|         try: | ||||
|             iter(self).next() | ||||
|         except StopIteration: | ||||
|             return False | ||||
|         return True | ||||
|  | ||||
|     def __getitem__(self, k): | ||||
|         "Retrieve an item or slice from the set of results." | ||||
|   | ||||
		Reference in New Issue
	
	Block a user