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
663809ed
Kaydet (Commit)
663809ed
authored
Tem 10, 2000
tarafından
Fredrik Lundh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
-- removed get_default compatibility kludge
-- added a few extra comments to locale.py
üst
dde61644
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
locale.py
Lib/locale.py
+3
-2
site.py
Lib/site.py
+1
-1
No files found.
Lib/locale.py
Dosyayı görüntüle @
663809ed
...
...
@@ -290,9 +290,12 @@ def getdefaultlocale(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')):
except
(
ImportError
,
AttributeError
):
pass
else
:
# make sure the code/encoding values are valid
if
sys
.
platform
==
"win32"
and
code
and
code
[:
2
]
==
"0x"
:
# map windows language identifier to language name
code
=
windows_locale
.
get
(
int
(
code
,
0
))
# ...add other platform-specific processing here, if
# necessary...
return
code
,
encoding
# fall back on POSIX behaviour
...
...
@@ -306,8 +309,6 @@ def getdefaultlocale(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')):
localename
=
'C'
return
_parse_localename
(
localename
)
# compatibility
get_default
=
getdefaultlocale
def
getlocale
(
category
=
LC_CTYPE
):
...
...
Lib/site.py
Dosyayı görüntüle @
663809ed
...
...
@@ -126,7 +126,7 @@ del exit
#
def
locale_aware_defaultencoding
():
import
locale
code
,
encoding
=
locale
.
get
_default
()
code
,
encoding
=
locale
.
get
defaultlocale
()
if
encoding
is
None
:
encoding
=
'ascii'
try
:
...
...
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