bpo-32028: Fix custom print suggestion having leading whitespace in print statement by CuriousLearner · Pull Request #4688 · python/cpython (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ncoghlan So, while I modified the code, one of the test cases fails with re-ordering the code. That test case is:
test_string_with_excessive_whitespace
. Since we're only stripping the the data at the beginning, and then directly trying to extract the sub-string.
I think we may need to strip the leading chars to make the previous test case pass. What do you say?