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
0c4d8d05
Kaydet (Commit)
0c4d8d05
authored
Kas 20, 2001
tarafından
Marc-André Lemburg
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix for bug #480188: printing unicode objects
üst
4586d2c9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
3 deletions
+39
-3
test_unicode
Lib/test/output/test_unicode
+13
-0
test_unicode.py
Lib/test/test_unicode.py
+13
-0
ceval.c
Python/ceval.c
+13
-3
No files found.
Lib/test/output/test_unicode
Dosyayı görüntüle @
0c4d8d05
...
...
@@ -6,3 +6,16 @@ Testing builtin unicode()... done.
Testing builtin codecs... done.
Testing standard mapping codecs... 0-127... 128-255... done.
Testing Unicode string concatenation... done.
Testing Unicode printing... abc
abc def
abc def
abc def
abc
abc
abc
def
def
done.
Lib/test/test_unicode.py
Dosyayı görüntüle @
0c4d8d05
...
...
@@ -644,3 +644,16 @@ verify((u"abc" "def") == u"abcdef")
verify
((
u"abc"
u"def"
"ghi"
)
==
u"abcdefghi"
)
verify
((
"abc"
"def"
u"ghi"
)
==
u"abcdefghi"
)
print
'done.'
print
'Testing Unicode printing...'
,
print
u'abc'
print
u'abc'
,
u'def'
print
u'abc'
,
'def'
print
'abc'
,
u'def'
print
u'abc
\n
'
print
u'abc
\n
'
,
print
u'abc
\n
'
,
print
u'def
\n
'
print
u'def
\n
'
print
'done.'
Python/ceval.c
Dosyayı görüntüle @
0c4d8d05
...
...
@@ -1349,14 +1349,24 @@ eval_frame(PyFrameObject *f)
err
=
PyFile_WriteString
(
" "
,
w
);
if
(
err
==
0
)
err
=
PyFile_WriteObject
(
v
,
w
,
Py_PRINT_RAW
);
if
(
err
==
0
&&
PyString_Check
(
v
)
)
{
if
(
err
==
0
)
{
/* XXX move into writeobject() ? */
char
*
s
=
PyString_AsString
(
v
);
int
len
=
PyString_Size
(
v
);
if
(
PyString_Check
(
v
))
{
char
*
s
=
PyString_AS_STRING
(
v
);
int
len
=
PyString_GET_SIZE
(
v
);
if
(
len
>
0
&&
isspace
(
Py_CHARMASK
(
s
[
len
-
1
]))
&&
s
[
len
-
1
]
!=
' '
)
PyFile_SoftSpace
(
w
,
0
);
}
else
if
(
PyUnicode_Check
(
v
))
{
Py_UNICODE
*
s
=
PyUnicode_AS_UNICODE
(
v
);
int
len
=
PyUnicode_GET_SIZE
(
v
);
if
(
len
>
0
&&
Py_UNICODE_ISSPACE
(
s
[
len
-
1
])
&&
s
[
len
-
1
]
!=
' '
)
PyFile_SoftSpace
(
w
,
0
);
}
}
Py_DECREF
(
v
);
Py_XDECREF
(
stream
);
...
...
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