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
4f5f98d7
Kaydet (Commit)
4f5f98d7
authored
May 04, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add missing documentation for bytes.decode().
üst
5f25972a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
unicode.rst
Doc/howto/unicode.rst
+1
-1
stdtypes.rst
Doc/library/stdtypes.rst
+20
-8
No files found.
Doc/howto/unicode.rst
Dosyayı görüntüle @
4f5f98d7
...
@@ -234,7 +234,7 @@ The String Type
...
@@ -234,7 +234,7 @@ The String Type
Since Python 3.0, the language features a ``str`` type that contain Unicode
Since Python 3.0, the language features a ``str`` type that contain Unicode
characters, meaning any string created using ``"unicode rocks!"``, ``'unicode
characters, meaning any string created using ``"unicode rocks!"``, ``'unicode
rocks!``, or the triple-quoted string syntax is stored as Unicode.
rocks!
'
``, or the triple-quoted string syntax is stored as Unicode.
To insert a Unicode character that is not part ASCII, e.g., any letters with
To insert a Unicode character that is not part ASCII, e.g., any letters with
accents, one can use escape sequences in their string literals as such::
accents, one can use escape sequences in their string literals as such::
...
...
Doc/library/stdtypes.rst
Dosyayı görüntüle @
4f5f98d7
...
@@ -800,14 +800,14 @@ functions based on regular expressions.
...
@@ -800,14 +800,14 @@ functions based on regular expressions.
.. method:: str.encode([encoding[, errors]])
.. method:: str.encode([encoding[, errors]])
Return an encoded version of the string
. Default encoding is the current
Return an encoded version of the string
as a bytes object. Default encoding
default string encoding. *errors* may be given to set a different error
is the current default string encoding. *errors* may be given to set a
handling scheme. The default for *errors* is ``'strict'``, meaning that
different error handling scheme. The default for *errors* is ``'strict'``,
encoding errors raise a :exc:`UnicodeError`. Other possible values ar
e
meaning that encoding errors raise a :exc:`UnicodeError`. Other possibl
e
``'ignore'``, ``'replace'``, ``'xmlcharrefreplace'``, ``'backslashreplace'`` and
values are ``'ignore'``, ``'replace'``, ``'xmlcharrefreplace'``,
any other name registered via :func:`codecs.register_error`, see section
``'backslashreplace'`` and any other name registered via
:
ref:`codec-base-classes`. For a list of possible encodings, see section
:
func:`codecs.register_error`, see section :ref:`codec-base-classes`. For a
:ref:`standard-encodings`.
list of possible encodings, see section
:ref:`standard-encodings`.
.. method:: str.endswith(suffix[, start[, end]])
.. method:: str.endswith(suffix[, start[, end]])
...
@@ -1512,6 +1512,18 @@ Wherever one of these methods needs to interpret the bytes as characters
...
@@ -1512,6 +1512,18 @@ Wherever one of these methods needs to interpret the bytes as characters
b = a.replace(b"a", b"f")
b = a.replace(b"a", b"f")
.. method:: bytes.decode([encoding[, errors]])
bytearray.decode([encoding[, errors]])
Return a string decoded from the given bytes. Default encoding is the
current default string encoding. *errors* may be given to set a different
error handling scheme. The default for *errors* is ``'strict'``, meaning
that encoding errors raise a :exc:`UnicodeError`. Other possible values are
``'ignore'``, ``'replace'`` and any other name registered via
:func:`codecs.register_error`, see section :ref:`codec-base-classes`. For a
list of possible encodings, see section :ref:`standard-encodings`.
The bytes and bytearray types have an additional class method:
The bytes and bytearray types have an additional class method:
.. classmethod:: bytes.fromhex(string)
.. classmethod:: bytes.fromhex(string)
...
...
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