Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a3c532b0
Commit
a3c532b0
authored
Apr 12, 2016
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[minor] - Correct the docstring of locale.str. Patch by poleto.
parent
7f7c605f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
Lib/locale.py
Lib/locale.py
+8
-9
No files found.
Lib/locale.py
View file @
a3c532b0
"""
Locale support
.
"""
Locale support module
.
The module provides low-level access to the C lib's locale APIs
The module provides low-level access to the C lib's locale APIs and adds high
and adds high level number formatting APIs as well as a locale
level number formatting APIs as well as a locale aliasing engine to complement
aliasing engine to complement
these.
these.
The aliasing engine includes support for many commonly used locale
The aliasing engine includes support for many commonly used locale names and
names and maps them to values suitable for passing to the C lib's
maps them to values suitable for passing to the C lib's setlocale() function. It
setlocale() function. It also includes default encodings for all
also includes default encodings for all supported locale names.
supported locale names.
"""
"""
...
@@ -298,7 +297,7 @@ def currency(val, symbol=True, grouping=False, international=False):
...
@@ -298,7 +297,7 @@ def currency(val, symbol=True, grouping=False, international=False):
return
s
.
replace
(
'<'
,
''
).
replace
(
'>'
,
''
)
return
s
.
replace
(
'<'
,
''
).
replace
(
'>'
,
''
)
def
str
(
val
):
def
str
(
val
):
"""Convert float to
integer
, taking the locale into account."""
"""Convert float to
string
, taking the locale into account."""
return
format
(
"%.12g"
,
val
)
return
format
(
"%.12g"
,
val
)
def
delocalize
(
string
):
def
delocalize
(
string
):
...
...
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