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
386b2b18
Kaydet (Commit)
386b2b18
authored
Nis 18, 2014
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge with 3.4. Closes #21232.
üst
dee46b37
bddecc38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
difflib.rst
Doc/library/difflib.rst
+6
-6
No files found.
Doc/library/difflib.rst
Dosyayı görüntüle @
386b2b18
...
...
@@ -230,8 +230,8 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
:file:`Tools/scripts/ndiff.py` is a command-line front-end to this function.
>>> diff = ndiff('one\ntwo\nthree\n'.splitlines(
1
),
... 'ore\ntree\nemu\n'.splitlines(
1
))
>>> diff = ndiff('one\ntwo\nthree\n'.splitlines(
keepends=True
),
... 'ore\ntree\nemu\n'.splitlines(
keepends=True
))
>>> print(''.join(diff), end="")
- one
? ^
...
...
@@ -254,8 +254,8 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
Example:
>>> diff = ndiff('one\ntwo\nthree\n'.splitlines(
1
),
... 'ore\ntree\nemu\n'.splitlines(
1
))
>>> diff = ndiff('one\ntwo\nthree\n'.splitlines(
keepends=True
),
... 'ore\ntree\nemu\n'.splitlines(
keepends=True
))
>>> diff = list(diff) # materialize the generated delta into a list
>>> print(''.join(restore(diff, 1)), end="")
one
...
...
@@ -660,7 +660,7 @@ obtained from the :meth:`~io.BaseIO.readlines` method of file-like objects):
... 2. Explicit is better than implicit.
... 3. Simple is better than complex.
... 4. Complex is better than complicated.
... '''.splitlines(
1
)
... '''.splitlines(
keepends=True
)
>>> len(text1)
4
>>> text1[0][-1]
...
...
@@ -669,7 +669,7 @@ obtained from the :meth:`~io.BaseIO.readlines` method of file-like objects):
... 3. Simple is better than complex.
... 4. Complicated is better than complex.
... 5. Flat is better than nested.
... '''.splitlines(
1
)
... '''.splitlines(
keepends=True
)
Next we instantiate a Differ object:
...
...
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