Issue 18708: Change required in python 3.4 interpretor . (original) (raw)
Unlike C, Python doesn't have any 'character' type: the elements of a string are simply 1-character strings. The two quote styles are mostly interchangeable: again, unlike C, there's no particular meaning attached to the use of single quotes or double quotes.
So you'd be asking for 1-character strings to be represented using single quotes and multi-character strings to be representing using double quotes. That doesn't seem like a particularly useful distinction. Worse, it might even be misleading, since it would suggest a C-like distinction between characters and strings.
As to which file: you're looking for the implementation of str.repr, which is in the unicode_repr function in Objects/unicodeobject.c. The logic for choosing which style of quote to use is about 50 lines into that function (line 12128 at revision eeda59e08c83).
Closing this as rejected.