
report at bugs
Aug 11, 2013, 5:04 AM
Post #2 of 2
(10 views)
Permalink
|
|
[issue18708] Change required in python 3.4 interpretor .
[In reply to]
|
|
Mark Dickinson added the comment: 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. ---------- nosy: +mark.dickinson resolution: -> rejected status: open -> closed _______________________________________ Python tracker <report [at] bugs> <http://bugs.python.org/issue18708> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|