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
This commit is contained in:
Alex Gaynor 2012-02-16 01:10:21 +00:00
parent 6072e108e2
commit b9b3e9f0ef
2 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ def int_to_base36(i):
""" """
digits = "0123456789abcdefghijklmnopqrstuvwxyz" digits = "0123456789abcdefghijklmnopqrstuvwxyz"
factor = 0 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.") raise ValueError("Base36 conversion input too large or incorrect type.")
# Find starting factor # Find starting factor
while True: while True: