gh-103925: csv.py _guess_quote_and_delimiter should be able to handle windows \r#103926
gh-103925: csv.py _guess_quote_and_delimiter should be able to handle windows \r#103926lilaboc wants to merge 6 commits into
Conversation
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
| r'(?:^|\n)(?P<quote>["\']).*?(?P=quote)(?P<delim>[^\w\n"\'])(?P<space> ?)', # ".*?", | ||
| r'(?P<delim>[^\w\n"\'])(?P<space> ?)(?P<quote>["\']).*?(?P=quote)(?:$|\n)', # ,".*?" | ||
| r'(?:^|\n)(?P<quote>["\']).*?(?P=quote)(?:$|\n)'): # ".*?" (no delim, no space) | ||
| for restr in (r'(?P<delim>[^\w\n"\'])(?P<space> ?)(?P<quote>["\']).*?(?P=quote)(?P=delim)', # ,".*?", |
There was a problem hiding this comment.
I think the space rule here is to "align the comments but make the lines as short as possible", which basically means align to the longest line. Now with your change, the third line becomes the longest, so you should probably leave one space between the comment and the code on the third line, and align with that. (one extra space on the other lines if I counted correctly)
There was a problem hiding this comment.
PEP 8: E261 at least two spaces before inline comment
I made another commit to use 2 spaces for now
There was a problem hiding this comment.
Right, two definitely works. The original code uses a single space, probably because the line was long. But two is good for me.
|
This PR is stale because it has been open for 30 days with no activity. |
Uh oh!
There was an error while loading. Please reload this page.