diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-02-24 03:16:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-24 03:16:00 (GMT) |
commit | cd2112f0b9ce3d1a8cff61c16a9208115fb1dbf4 (patch) | |
tree | 46700f0345e940664a1cc8faf9f532263d62c06a /Lib/idlelib/hyperparser.py | |
parent | cffe0467ab7b164739693598826bd3860f01b11f (diff) | |
download | cpython-cd2112f0b9ce3d1a8cff61c16a9208115fb1dbf4.zip cpython-cd2112f0b9ce3d1a8cff61c16a9208115fb1dbf4.tar.gz cpython-cd2112f0b9ce3d1a8cff61c16a9208115fb1dbf4.tar.bz2 |
bpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830)
Adjust tests and user modules to match.
(cherry picked from commit c29c03a34a9f3c82704b66f323ce5ea9dc89c8af)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Diffstat (limited to 'Lib/idlelib/hyperparser.py')
-rw-r--r-- | Lib/idlelib/hyperparser.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/idlelib/hyperparser.py b/Lib/idlelib/hyperparser.py index 450a709..a42665b 100644 --- a/Lib/idlelib/hyperparser.py +++ b/Lib/idlelib/hyperparser.py @@ -44,7 +44,7 @@ class HyperParser: # at end. We add a space so that index won't be at end # of line, so that its status will be the same as the # char before it, if should. - parser.set_str(text.get(startatindex, stopatindex)+' \n') + parser.set_code(text.get(startatindex, stopatindex)+' \n') bod = parser.find_good_parse_start( editwin._build_char_in_string_func(startatindex)) if bod is not None or startat == 1: @@ -60,12 +60,12 @@ class HyperParser: # We add the newline because PyParse requires it. We add a # space so that index won't be at end of line, so that its # status will be the same as the char before it, if should. - parser.set_str(text.get(startatindex, stopatindex)+' \n') + parser.set_code(text.get(startatindex, stopatindex)+' \n') parser.set_lo(0) # We want what the parser has, minus the last newline and space. - self.rawtext = parser.str[:-2] - # Parser.str apparently preserves the statement we are in, so + self.rawtext = parser.code[:-2] + # Parser.code apparently preserves the statement we are in, so # that stopatindex can be used to synchronize the string with # the text box indices. self.stopatindex = stopatindex |