Sujet : Re: backslash in triple quoted string
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.pythonDate : 08. May 2025, 16:46:08
Autres entêtes
Organisation : Stefan Ram
Message-ID : <documentation-20250508163928@ram.dialup.fu-berlin.de>
References : 1 2 3 4
Left Right <
olegsivokon@gmail.com> wrote or quoted:
Also, it appears that the change linked above is a lie:
The Python documentation is a bit, "informal".
A "more formal specification" can be found in, maybe (if I found
the right place), the function definition "_PyBytes_DecodeEscape"
in the source file "Objects\bytesobject.c":
|switch (*s++) {
|/* XXX This assumes ASCII! */
|case '\n': break;
|case '\': *p++ = '\'; break;
|case '\'': *p++ = '\''; break;
|case '\"': *p++ = '\"'; break;
. . .
. In 2015, Jakub Przywoski started to write a new specification:
|Python is such a well-designed, clean and enjoyable to code in
|language so it sure deserves to have a decent syntax reference.
. It seems, however, that he was not yet able to finish his project
or to update it to newer versions of Python. It would be a full-time
project I think!
Effectively, Python is what CPython does.