Mercurial > p > roundup > code
comparison roundup/token.py @ 5381:0942fe89e82e
Python 3 preparation: change "x.has_key(y)" to "y in x".
(Also likewise "not in" where appropriate.) Tool-generated patch.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Tue, 24 Jul 2018 22:08:17 +0000 |
| parents | bc16d91b7a50 |
| children | 7d276bb8b46d |
comparison
equal
deleted
inserted
replaced
| 5380:64c4e43fbb84 | 5381:0942fe89e82e |
|---|---|
| 104 continue | 104 continue |
| 105 elif state == ESCAPE: | 105 elif state == ESCAPE: |
| 106 # escaped-char conversions (t, r, n) | 106 # escaped-char conversions (t, r, n) |
| 107 # TODO: octal, hexdigit | 107 # TODO: octal, hexdigit |
| 108 state = oldstate | 108 state = oldstate |
| 109 if escaped.has_key(c): | 109 if c in escaped: |
| 110 c = escaped[c] | 110 c = escaped[c] |
| 111 # just add this char to the token and move along | 111 # just add this char to the token and move along |
| 112 token = token + c | 112 token = token + c |
| 113 pos = pos + 1 | 113 pos = pos + 1 |
| 114 return l | 114 return l |
