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
577fc04a
Kaydet (Commit)
577fc04a
authored
Nis 09, 2017
tarafından
Mariatta
Kaydeden (comit)
GitHub
Nis 09, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[3.6] bpo-29549: Fixes docstring for str.index (GH-256) (GH-1028)
(cherry picked from commit
43ba8861
)
üst
90eb7a9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
bytes_methods.c
Objects/bytes_methods.c
+10
-3
unicodeobject.c
Objects/unicodeobject.c
+10
-2
No files found.
Objects/bytes_methods.c
Dosyayı görüntüle @
577fc04a
...
...
@@ -542,7 +542,11 @@ _Py_bytes_find(const char *str, Py_ssize_t len, PyObject *args)
PyDoc_STRVAR_shared
(
_Py_index__doc__
,
"B.index(sub[, start[, end]]) -> int
\n
\
\n
\
Like B.find() but raise ValueError when the subsection is not found."
);
Return the lowest index in B where subsection sub is found,
\n
\
such that sub is contained within B[start,end]. Optional
\n
\
arguments start and end are interpreted as in slice notation.
\n
\
\n
\
Raises ValueError when the subsection is not found."
);
PyObject
*
_Py_bytes_index
(
const
char
*
str
,
Py_ssize_t
len
,
PyObject
*
args
)
...
...
@@ -579,7 +583,11 @@ _Py_bytes_rfind(const char *str, Py_ssize_t len, PyObject *args)
PyDoc_STRVAR_shared
(
_Py_rindex__doc__
,
"B.rindex(sub[, start[, end]]) -> int
\n
\
\n
\
Like B.rfind() but raise ValueError when the subsection is not found."
);
Return the highest index in B where subsection sub is found,
\n
\
such that sub is contained within B[start,end]. Optional
\n
\
arguments start and end are interpreted as in slice notation.
\n
\
\n
\
Raise ValueError when the subsection is not found."
);
PyObject
*
_Py_bytes_rindex
(
const
char
*
str
,
Py_ssize_t
len
,
PyObject
*
args
)
...
...
@@ -811,4 +819,3 @@ PyDoc_STRVAR_shared(_Py_zfill__doc__,
"
\n
"
"Pad a numeric string B with zeros on the left, to fill a field
\n
"
"of the specified width. B is never truncated."
);
Objects/unicodeobject.c
Dosyayı görüntüle @
577fc04a
...
...
@@ -11701,7 +11701,11 @@ unicode_hash(PyObject *self)
PyDoc_STRVAR(index__doc__,
"S.index(sub[, start[, end]]) -> int\n\
\n\
Like S.find() but raise ValueError when the substring is not found.");
Return the lowest index in S where substring sub is found, \n\
such that sub is contained within S[start:end]. Optional\n\
arguments start and end are interpreted as in slice notation.\n\
\n\
Raises ValueError when the substring is not found.");
static PyObject *
unicode_index(PyObject *self, PyObject *args)
...
...
@@ -12758,7 +12762,11 @@ unicode_rfind(PyObject *self, PyObject *args)
PyDoc_STRVAR(rindex__doc__,
"S.rindex(sub[, start[, end]]) -> int\n\
\n\
Like S.rfind() but raise ValueError when the substring is not found.");
Return the highest index in S where substring sub is found,\n\
such that sub is contained within S[start:end]. Optional\n\
arguments start and end are interpreted as in slice notation.\n\
\n\
Raises ValueError when the substring is not found.");
static PyObject *
unicode_rindex(PyObject *self, PyObject *args)
...
...
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