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
8218bd4c
Kaydet (Commit)
8218bd4c
authored
Nis 01, 2015
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
document what exactly str.splitlines() splits on (closes #12855)
Patch by Martin Panter.
üst
b9100e5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
4 deletions
+36
-4
stdtypes.rst
Doc/library/stdtypes.rst
+36
-4
No files found.
Doc/library/stdtypes.rst
Dosyayı görüntüle @
8218bd4c
...
...
@@ -1855,10 +1855,42 @@ expression support in the :mod:`re` module).
.. method:: str.splitlines([keepends])
Return a list of the lines in the string, breaking at line boundaries.
This method uses the :term:`universal newlines` approach to splitting lines.
Line breaks are not included in the resulting list unless *keepends* is
given and true.
Return a list of the lines in the string, breaking at line boundaries. Line
breaks are not included in the resulting list unless *keepends* is given and
true.
This method splits on the following line boundaries. In particular, the
boundaries are a superset of :term:`universal newlines`.
+-----------------------+-----------------------------+
| Representation | Description |
+=======================+=============================+
| ``\n`` | Line Feed |
+-----------------------+-----------------------------+
| ``\r`` | Carriage Return |
+-----------------------+-----------------------------+
| ``\r\n`` | Carriage Return + Line Feed |
+-----------------------+-----------------------------+
| ``\v`` or ``\x0b`` | Line Tabulation |
+-----------------------+-----------------------------+
| ``\f`` or ``\x0c`` | Form Feed |
+-----------------------+-----------------------------+
| ``\x1c`` | File Separator |
+-----------------------+-----------------------------+
| ``\x1d`` | Group Separator |
+-----------------------+-----------------------------+
| ``\x1e`` | Record Separator |
+-----------------------+-----------------------------+
| ``\x85`` | Next Line (C1 Control Code) |
+-----------------------+-----------------------------+
| ``\u2028`` | Line Separator |
+-----------------------+-----------------------------+
| ``\u2029`` | Paragraph Separator |
+-----------------------+-----------------------------+
.. versionchanged:: 3.2
``\v`` and ``\f`` added to list of line boundaries.
For example::
...
...
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