Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9970c4c

Browse filesBrowse files
jopemachineyouknowone
authored andcommitted
Update Lib/locale.py from CPython v3.12.0a0
1 parent ad5ffb6 commit 9970c4c
Copy full SHA for 9970c4c

File tree

1 file changed

+1
-16
lines changed
Filter options

1 file changed

+1
-16
lines changed

‎Lib/locale.py

Copy file name to clipboardExpand all lines: Lib/locale.py
+1-16Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# trying the import. So __all__ is also fiddled at the end of the file.
2727
__all__ = ["getlocale", "getdefaultlocale", "getpreferredencoding", "Error",
2828
"setlocale", "resetlocale", "localeconv", "strcoll", "strxfrm",
29-
"str", "atof", "atoi", "format", "format_string", "currency",
29+
"str", "atof", "atoi", "format_string", "currency",
3030
"normalize", "LC_CTYPE", "LC_COLLATE", "LC_TIME", "LC_MONETARY",
3131
"LC_NUMERIC", "LC_ALL", "CHAR_MAX", "getencoding"]
3232

@@ -247,21 +247,6 @@ def format_string(f, val, grouping=False, monetary=False):
247247

248248
return new_f % val
249249

250-
def format(percent, value, grouping=False, monetary=False, *additional):
251-
"""Deprecated, use format_string instead."""
252-
import warnings
253-
warnings.warn(
254-
"This method will be removed in a future version of Python. "
255-
"Use 'locale.format_string()' instead.",
256-
DeprecationWarning, stacklevel=2
257-
)
258-
259-
match = _percent_re.match(percent)
260-
if not match or len(match.group())!= len(percent):
261-
raise ValueError(("format() must be given exactly one %%char "
262-
"format specifier, %s not valid") % repr(percent))
263-
return _format(percent, value, grouping, monetary, *additional)
264-
265250
def currency(val, symbol=True, grouping=False, international=False):
266251
"""Formats val according to the currency settings
267252
in the current locale."""

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.