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
c3845a14
Kaydet (Commit)
c3845a14
authored
Nis 21, 1999
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Logical markup & other small nits.
üst
11bc8cfe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
liblocale.tex
Doc/lib/liblocale.tex
+15
-16
No files found.
Doc/lib/liblocale.tex
Dosyayı görüntüle @
c3845a14
\section
{
\module
{
locale
}
---
\section
{
\module
{
locale
}
---
Internationalization services.
}
Internationalization services
}
\declaremodule
{
standard
}{
locale
}
\declaremodule
{
standard
}{
locale
}
\modulesynopsis
{
Internationalization services.
}
\modulesynopsis
{
Internationalization services.
}
The
\
cod
e
{
locale
}
module opens access to the
\POSIX
{}
locale database
The
\
modul
e
{
locale
}
module opens access to the
\POSIX
{}
locale database
and functionality. The
\POSIX
{}
locale mechanism allows programmers
and functionality. The
\POSIX
{}
locale mechanism allows programmers
to deal with certain cultural issues in an application, without
to deal with certain cultural issues in an application, without
requiring the programmer to know all the specifics of each country
requiring the programmer to know all the specifics of each country
...
@@ -14,7 +13,7 @@ where the software is executed.
...
@@ -14,7 +13,7 @@ where the software is executed.
The
\module
{
locale
}
module is implemented on top of the
The
\module
{
locale
}
module is implemented on top of the
\module
{_
locale
}
\refbimodindex
{_
locale
}
module, which in turn uses an
\module
{_
locale
}
\refbimodindex
{_
locale
}
module, which in turn uses an
ANSI
\C
{}
locale implementation if available.
ANSI
C
locale implementation if available.
The
\module
{
locale
}
module defines the following exception and
The
\module
{
locale
}
module defines the following exception and
functions:
functions:
...
@@ -38,8 +37,8 @@ import locale
...
@@ -38,8 +37,8 @@ import locale
locale.setlocale(locale.LC
_
ALL,"")
locale.setlocale(locale.LC
_
ALL,"")
\end{verbatim}
\end{verbatim}
This sets the locale for all categories to the user's default setting
This sets the locale for all categories to the user's default setting
(typically specified in the
\
code
{
LANG
}
environment variable). If the
(typically specified in the
\
envvar
{
LANG
}
environment variable). If
locale is not changed thereafter, using multithreading should not
the
locale is not changed thereafter, using multithreading should not
cause problems.
cause problems.
\end{funcdesc}
\end{funcdesc}
...
@@ -52,16 +51,16 @@ Returns the database of of the local conventions as a dictionary. This
...
@@ -52,16 +51,16 @@ Returns the database of of the local conventions as a dictionary. This
dictionary has the following strings as keys:
dictionary has the following strings as keys:
\begin{itemize}
\begin{itemize}
\item
\code
{
decimal
_
point
}
specifies the decimal point used in
\item
\code
{
decimal
_
point
}
specifies the decimal point used in
floating point number representations for the
\co
de
{
LC
_
NUMERIC
}
floating point number representations for the
\co
nstant
{
LC
_
NUMERIC
}
category.
category.
\item
\code
{
grouping
}
is a sequence of numbers specifying at which
\item
\code
{
grouping
}
is a sequence of numbers specifying at which
relative positions the
\code
{
thousands
_
sep
}
is expected. If the
relative positions the
\code
{
thousands
_
sep
}
is expected. If the
sequence is terminated with
\co
de
{
locale.
CHAR
_
MAX
}
, no further
sequence is terminated with
\co
nstant
{
CHAR
_
MAX
}
, no further
grouping is performed. If the sequence terminates with a
\code
{
0
}
, the last
grouping is performed. If the sequence terminates with a
\code
{
0
}
, the last
group size is repeatedly used.
group size is repeatedly used.
\item
\code
{
thousands
_
sep
}
is the character used between groups.
\item
\code
{
thousands
_
sep
}
is the character used between groups.
\item
\code
{
int
_
curr
_
symbol
}
specifies the international currency
\item
\code
{
int
_
curr
_
symbol
}
specifies the international currency
symbol from the
\co
de
{
LC
_
MONETARY
}
category.
symbol from the
\co
nstant
{
LC
_
MONETARY
}
category.
\item
\code
{
currency
_
symbol
}
is the local currency symbol.
\item
\code
{
currency
_
symbol
}
is the local currency symbol.
\item
\code
{
mon
_
decimal
_
point
}
is the decimal point used in monetary
\item
\code
{
mon
_
decimal
_
point
}
is the decimal point used in monetary
values.
values.
...
@@ -84,8 +83,8 @@ the currency symbol.
...
@@ -84,8 +83,8 @@ the currency symbol.
sign should be placed for positive and negative monetary values.
sign should be placed for positive and negative monetary values.
\end{itemize}
\end{itemize}
The possible values for
\code
{
p
_
sign
_
posn
}
and
\code
{
n
_
sign
_
posn
}
The possible values for
\code
{
p
_
sign
_
posn
}
and
are given below.
\code
{
n
_
sign
_
posn
}
are given below.
\begin{tableii}
{
c|l
}{
code
}{
Value
}{
Explanation
}
\begin{tableii}
{
c|l
}{
code
}{
Value
}{
Explanation
}
\lineii
{
0
}{
Currency and value are surrounded by parentheses.
}
\lineii
{
0
}{
Currency and value are surrounded by parentheses.
}
...
@@ -138,7 +137,7 @@ conventions.
...
@@ -138,7 +137,7 @@ conventions.
\begin{datadesc}
{
LC
_
CTYPE
}
\begin{datadesc}
{
LC
_
CTYPE
}
\refstmodindex
{
string
}
\refstmodindex
{
string
}
Locale category for the character type functions. Depending on the
Locale category for the character type functions. Depending on the
settings of this category, the functions of module
\module
{
string
}
settings of this category, the functions of module
\
ref
module
{
string
}
dealing with case change their behaviour.
dealing with case change their behaviour.
\end{datadesc}
\end{datadesc}
...
@@ -226,7 +225,7 @@ should you document that your module is not compatible with
...
@@ -226,7 +225,7 @@ should you document that your module is not compatible with
non-
\samp
{
C
}
locale settings.
non-
\samp
{
C
}
locale settings.
The case conversion functions in the
The case conversion functions in the
\module
{
string
}
\refstmodindex
{
string
}
and
\
ref
module
{
string
}
\refstmodindex
{
string
}
and
\module
{
strop
}
\refbimodindex
{
strop
}
modules are affected by the locale
\module
{
strop
}
\refbimodindex
{
strop
}
modules are affected by the locale
settings. When a call to the
\function
{
setlocale()
}
function changes
settings. When a call to the
\function
{
setlocale()
}
function changes
the
\constant
{
LC
_
CTYPE
}
settings, the variables
the
\constant
{
LC
_
CTYPE
}
settings, the variables
...
@@ -258,8 +257,8 @@ generally okay, and Python will use whatever locale is set,
...
@@ -258,8 +257,8 @@ generally okay, and Python will use whatever locale is set,
The
\function
{
setlocale()
}
function in the
\module
{
locale
}
module contains
The
\function
{
setlocale()
}
function in the
\module
{
locale
}
module contains
gives the Python progammer the impression that you can manipulate the
gives the Python progammer the impression that you can manipulate the
\constant
{
LC
_
NUMERIC
}
locale setting, but this not the case at the
\C
{}
\constant
{
LC
_
NUMERIC
}
locale setting, but this not the case at the
C
level:
\C
{}
code will always find that the
\constant
{
LC
_
NUMERIC
}
locale
level:
C
code will always find that the
\constant
{
LC
_
NUMERIC
}
locale
setting is
\samp
{
C
}
. This is because too much would break when the
setting is
\samp
{
C
}
. This is because too much would break when the
decimal point character is set to something else than a period
decimal point character is set to something else than a period
(e.g. the Python parser would break). Caveat: threads that run
(e.g. the Python parser would break). Caveat: threads that run
...
...
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