From b9b3e9f0efe3fe9d5d976533ff2f13359825f5da Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 16 Feb 2012 01:10:21 +0000 Subject: Use Python's changed comparisons, which makes this a bit more readable. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17526 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django') diff --git a/django/utils/http.py b/django/utils/http.py index 1431f47246..d343a375c0 100644 --- a/django/utils/http.py +++ b/django/utils/http.py @@ -171,7 +171,7 @@ def int_to_base36(i): """ digits = "0123456789abcdefghijklmnopqrstuvwxyz" factor = 0 - if (i < 0) or (i > sys.maxint): + if not 0 <= i <= sys.maxint: raise ValueError("Base36 conversion input too large or incorrect type.") # Find starting factor while True: -- cgit v1.3