Mercurial > p > roundup > code
comparison roundup/cgi/TAL/TALGenerator.py @ 5391:a391a071d045
Python 3 preparation: use range() instead of xrange().
Tool-assisted patch. None of the existing range() uses seem to need
to be wrapped in list(). Note that range() may be less efficient than
xrange() in Python 2.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Tue, 24 Jul 2018 23:00:54 +0000 |
| parents | d26921b851c3 |
| children | 1a835db41674 |
comparison
equal
deleted
inserted
replaced
| 5390:0fd27da353eb | 5391:a391a071d045 |
|---|---|
| 77 cursor = 0 | 77 cursor = 0 |
| 78 if self.xml: | 78 if self.xml: |
| 79 endsep = "/>" | 79 endsep = "/>" |
| 80 else: | 80 else: |
| 81 endsep = " />" | 81 endsep = " />" |
| 82 for cursor in xrange(len(program)+1): | 82 for cursor in range(len(program)+1): |
| 83 try: | 83 try: |
| 84 item = program[cursor] | 84 item = program[cursor] |
| 85 except IndexError: | 85 except IndexError: |
| 86 item = (None, None) | 86 item = (None, None) |
| 87 opcode = item[0] | 87 opcode = item[0] |
