This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Normalize single/double quote usage in importlib
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: Arfrever, brett.cannon, madison.may, python-dev, vstinner
Priority: low Keywords: easy, patch

Created on 2013-07-09 19:32 by brett.cannon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
all_single_quotes.patch madison.may, 2013-07-11 19:16 Double quotes --> Single quotes review
all_double_quotes.patch madison.may, 2013-07-11 19:17 Single quotes --> Double quotes review
Messages (10)
msg192771 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-07-09 19:32
Importlib has ended up with a mixed use of single and double quotes. Should clean it up to be consistent.
msg192775 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-07-09 20:13
Do you mean in .c and .py files, or in error messages?
msg192777 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-07-09 20:22
String constants in importlib/_bootstrap.py; pylint noticed the discrepancy.
msg192887 - (view) Author: Madison May (madison.may) * Date: 2013-07-11 19:16
Patch using all single quotes for string literals, except for 3 cases of double quoted strings that contain single quotes (I thought it was probably preferable to escaping the single quotes).
msg192888 - (view) Author: Madison May (madison.may) * Date: 2013-07-11 19:17
Patch using all double quotes. Take your pick :)
msg192891 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-07-11 19:38
I prefer single quotes (easier to type =) and yes, using double quotes instead of escaping is preferred.

When I have a chance I will take a look at the patch.
msg192935 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-07-12 12:28
Why the stage change? I set it to commit review on purpose as I already did a cursory check and it was fine. I have only have one more paranoid check before do the commit myself. I purposely didn't set patch review as I didn't want anyone wasting their time doing one as I'm going to do the one more and that's enough for committal.
msg192943 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-07-12 15:04
New changeset 33d379c2bb79 by Brett Cannon in branch 'default':
Issue #18415: Normalize what type of quotes are used with string
http://hg.python.org/cpython/rev/33d379c2bb79
msg192944 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-07-12 15:05
Thanks for the path, Madison! I also cleaned up the instances using double quotes since it was because I was faking the use of a string's repr instead of explicitly using {!r}.
msg192949 - (view) Author: Madison May (madison.may) * Date: 2013-07-12 15:51
No problem, Brett.  Glad to hear you could get rid of those few last pesky double quotes.  I'm partial to the single quotes as well.
History
Date User Action Args
2022-04-11 14:57:47adminsetgithub: 62615
2013-07-12 15:51:45madison.maysetmessages: + msg192949
2013-07-12 15:05:31brett.cannonsetstatus: open -> closed
resolution: fixed
messages: + msg192944

stage: commit review -> resolved
2013-07-12 15:04:32python-devsetnosy: + python-dev
messages: + msg192943
2013-07-12 12:28:04brett.cannonsetmessages: + msg192935
stage: patch review -> commit review
2013-07-12 06:40:17Arfreversetstage: commit review -> patch review
2013-07-11 19:38:52brett.cannonsetmessages: + msg192891
stage: needs patch -> commit review
2013-07-11 19:17:32madison.maysetfiles: + all_double_quotes.patch

messages: + msg192888
2013-07-11 19:16:43madison.maysetfiles: + all_single_quotes.patch

nosy: + madison.may
messages: + msg192887

keywords: + patch
2013-07-09 20:22:37brett.cannonsetmessages: + msg192777
2013-07-09 20:14:29Arfreversetnosy: + Arfrever
2013-07-09 20:13:17vstinnersetnosy: + vstinner
messages: + msg192775
2013-07-09 19:32:29brett.cannoncreate