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
25f90d5c
Kaydet (Commit)
25f90d5c
authored
Eyl 03, 2003
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use de_DE in example, change message for unknown locale. Fixes #797447.
Will backport to 2.3.
üst
2e31ce25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
liblocale.tex
Doc/lib/liblocale.tex
+1
-1
_localemodule.c
Modules/_localemodule.c
+2
-2
No files found.
Doc/lib/liblocale.tex
Dosyayı görüntüle @
25f90d5c
...
@@ -398,7 +398,7 @@ Example:
...
@@ -398,7 +398,7 @@ Example:
\begin{verbatim}
\begin{verbatim}
>>> import locale
>>> import locale
>>> loc = locale.setlocale(locale.LC
_
ALL) # get current locale
>>> loc = locale.setlocale(locale.LC
_
ALL) # get current locale
>>> locale.setlocale(locale.LC
_
ALL, 'de
') # use German locale
>>> locale.setlocale(locale.LC
_
ALL, 'de
_
DE') # use German locale; name might vary with platform
>>> locale.strcoll('f
\xe
4n', 'foo') # compare a string containing an umlaut
>>> locale.strcoll('f
\xe
4n', 'foo') # compare a string containing an umlaut
>>> locale.setlocale(locale.LC
_
ALL, '') # use user's preferred locale
>>> locale.setlocale(locale.LC
_
ALL, '') # use user's preferred locale
>>> locale.setlocale(locale.LC
_
ALL, 'C') # use default (C) locale
>>> locale.setlocale(locale.LC
_
ALL, 'C') # use default (C) locale
...
...
Modules/_localemodule.c
Dosyayı görüntüle @
25f90d5c
/***********************************************************
/***********************************************************
Copyright (C) 1997, 2002 Martin von Loewis
Copyright (C) 1997, 2002
, 2003
Martin von Loewis
Permission to use, copy, modify, and distribute this software and its
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
documentation for any purpose and without fee is hereby granted,
...
@@ -177,7 +177,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
...
@@ -177,7 +177,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
result
=
setlocale
(
category
,
locale
);
result
=
setlocale
(
category
,
locale
);
if
(
!
result
)
{
if
(
!
result
)
{
/* operation failed, no setting was changed */
/* operation failed, no setting was changed */
PyErr_SetString
(
Error
,
"
locale setting not supported
"
);
PyErr_SetString
(
Error
,
"
unsupported locale setting
"
);
return
NULL
;
return
NULL
;
}
}
result_object
=
PyString_FromString
(
result
);
result_object
=
PyString_FromString
(
result
);
...
...
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