Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
7db964d5
Kaydet (Commit)
7db964d5
authored
Eyl 25, 2010
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#1865: document syntax for bytes literals.
üst
a0b6a495
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
lexical_analysis.rst
Doc/reference/lexical_analysis.rst
+5
-2
No files found.
Doc/reference/lexical_analysis.rst
Dosyayı görüntüle @
7db964d5
...
@@ -426,6 +426,7 @@ String literals are described by the following lexical definitions:
...
@@ -426,6 +426,7 @@ String literals are described by the following lexical definitions:
.. productionlist::
.. productionlist::
stringliteral: [`stringprefix`](`shortstring` | `longstring`)
stringliteral: [`stringprefix`](`shortstring` | `longstring`)
stringprefix: "r" | "u" | "ur" | "R" | "U" | "UR" | "Ur" | "uR"
stringprefix: "r" | "u" | "ur" | "R" | "U" | "UR" | "Ur" | "uR"
: | "b" | "B" | "br" | "Br" | "bR" | "BR"
shortstring: "'" `shortstringitem`* "'" | '"' `shortstringitem`* '"'
shortstring: "'" `shortstringitem`* "'" | '"' `shortstringitem`* '"'
longstring: "'''" `longstringitem`* "'''"
longstring: "'''" `longstringitem`* "'''"
: | '"""' `longstringitem`* '"""'
: | '"""' `longstringitem`* '"""'
...
@@ -458,8 +459,10 @@ different rules for interpreting backslash escape sequences. A prefix of
...
@@ -458,8 +459,10 @@ different rules for interpreting backslash escape sequences. A prefix of
``'u'`` or ``'U'`` makes the string a Unicode string. Unicode strings use the
``'u'`` or ``'U'`` makes the string a Unicode string. Unicode strings use the
Unicode character set as defined by the Unicode Consortium and ISO 10646. Some
Unicode character set as defined by the Unicode Consortium and ISO 10646. Some
additional escape sequences, described below, are available in Unicode strings.
additional escape sequences, described below, are available in Unicode strings.
The two prefix characters may be combined; in this case, ``'u'`` must appear
A prefix of ``'b'`` or ``'B'`` is ignored in Python 2; it indicates that the
before ``'r'``.
literal should become a bytes literal in Python 3 (e.g. when code is
automatically converted with 2to3). A ``'u'`` or ``'b'`` prefix may be followed
by an ``'r'`` prefix.
In triple-quoted strings, unescaped newlines and quotes are allowed (and are
In triple-quoted strings, unescaped newlines and quotes are allowed (and are
retained), except that three unescaped quotes in a row terminate the string. (A
retained), except that three unescaped quotes in a row terminate the string. (A
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment