Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-12611: 2to3 crashes when converting doctest using reduce() #15249

Open
wants to merge 4 commits into
base: master
from

Conversation

@aldwinaldwin
Copy link
Contributor

commented Aug 13, 2019

blurb-it bot and others added some commits Aug 13, 2019

@@ -592,12 +592,21 @@ def refactor_doctest(self, block, lineno, indent, filename):
return block
if self.refactor_tree(tree, filename):
new = str(tree).splitlines(keepends=True)
# Adjust lineno for lines inserted before
jmp = 0
for n in new:

This comment has been minimized.

Copy link
@corona10

corona10 Aug 26, 2019

Contributor

IMHO
This logic can be replaced by

jmp = new.index('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.