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
3571fbfe
Kaydet (Commit)
3571fbfe
authored
Eyl 01, 2008
tarafından
Amaury Forgeot d'Arc
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #3751: str.rpartition would perform a left-partition when called with
a unicode argument. will backport.
üst
aa5f8739
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
string_tests.py
Lib/test/string_tests.py
+5
-0
NEWS
Misc/NEWS
+3
-0
stringobject.c
Objects/stringobject.c
+1
-1
No files found.
Lib/test/string_tests.py
Dosyayı görüntüle @
3571fbfe
...
...
@@ -1117,6 +1117,9 @@ class MixinStrUnicodeUserStringTest:
self
.
checkraises
(
ValueError
,
S
,
'partition'
,
''
)
self
.
checkraises
(
TypeError
,
S
,
'partition'
,
None
)
# mixed use of str and unicode
self
.
assertEqual
(
'a/b/c'
.
partition
(
u'/'
),
(
'a'
,
'/'
,
'b/c'
))
def
test_rpartition
(
self
):
self
.
checkequal
((
'this is the rparti'
,
'ti'
,
'on method'
),
...
...
@@ -1132,6 +1135,8 @@ class MixinStrUnicodeUserStringTest:
self
.
checkraises
(
ValueError
,
S
,
'rpartition'
,
''
)
self
.
checkraises
(
TypeError
,
S
,
'rpartition'
,
None
)
# mixed use of str and unicode
self
.
assertEqual
(
'a/b/c'
.
rpartition
(
u'/'
),
(
'a/b'
,
'/'
,
'c'
))
class
MixinStrStringUserStringTest
:
# Additional tests for 8bit strings, i.e. str, UserString and
...
...
Misc/NEWS
Dosyayı görüntüle @
3571fbfe
...
...
@@ -12,6 +12,9 @@ What's New in Python 2.6 release candidate 1?
Core and Builtins
-----------------
- Issue #3751: str.rpartition would perform a left-partition when called with
a unicode argument.
- Issue #3683: Fix compilation when --without-threads is given.
- Issue #3668: Fix a memory leak with the "s*" argument parser in
...
...
Objects/stringobject.c
Dosyayı görüntüle @
3571fbfe
...
...
@@ -1638,7 +1638,7 @@ string_rpartition(PyStringObject *self, PyObject *sep_obj)
}
#ifdef Py_USING_UNICODE
else
if
(
PyUnicode_Check
(
sep_obj
))
return
PyUnicode_Partition
((
PyObject
*
)
self
,
sep_obj
);
return
PyUnicode_
R
Partition
((
PyObject
*
)
self
,
sep_obj
);
#endif
else
if
(
PyObject_AsCharBuffer
(
sep_obj
,
&
sep
,
&
sep_len
))
return
NULL
;
...
...
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