mirror of
https://github.com/django/django.git
synced 2025-11-11 16:23:59 +00:00
[py3] Added Python 3 compatibility for xrange.
This commit is contained in:
parent
ca07fda2ef
commit
a84d79f572
32 changed files with 77 additions and 53 deletions
|
|
@ -6,7 +6,7 @@ def _resolve_name(name, package, level):
|
|||
if not hasattr(package, 'rindex'):
|
||||
raise ValueError("'package' not set to a string")
|
||||
dot = len(package)
|
||||
for x in xrange(level, 1, -1):
|
||||
for x in range(level, 1, -1):
|
||||
try:
|
||||
dot = package.rindex('.', 0, dot)
|
||||
except ValueError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue