#23812 closed Cleanup/optimization (fixed)
Use django.utils.six.moves.range instead of xrange
| Reported by: | Tim Graham | Owned by: | mhall1 |
|---|---|---|---|
| Component: | Core (Other) | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
These imports are equivalent but by using range the code looks more like Python 3 and has the advantage that we simply remove the import when the time comes to drop Python 2.
Change History (9)
comment:1 by , 11 years ago
| Has patch: | set |
|---|
comment:2 by , 11 years ago
| Has patch: | unset |
|---|
comment:3 by , 11 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:5 by , 11 years ago
| Has patch: | set |
|---|
comment:6 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
The changes are available at https://github.com/mhall1/django/tree/ticket_23812
Tests passed under SQLite. Note: 7 tests are failing, but they are marked as expected failures and are also failing on master.