MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / resetlocale

Function resetlocale

tools/python-3.11.9-amd64/Lib/locale.py:629–647  ·  view source on GitHub ↗

Sets the locale for category to the default setting. The default setting is determined by calling getdefaultlocale(). category defaults to LC_ALL.

(category=LC_ALL)

Source from the content-addressed store, hash-verified

627 return _setlocale(category, locale)
628
629def resetlocale(category=LC_ALL):
630
631 """ Sets the locale for category to the default setting.
632
633 The default setting is determined by calling
634 getdefaultlocale(). category defaults to LC_ALL.
635
636 """
637 import warnings
638 warnings.warn(
639 'Use locale.setlocale(locale.LC_ALL, "") instead',
640 DeprecationWarning, stacklevel=2
641 )
642
643 with warnings.catch_warnings():
644 warnings.simplefilter('ignore', category=DeprecationWarning)
645 loc = getdefaultlocale()
646
647 _setlocale(category, _build_localename(loc))
648
649
650try:

Callers 1

_print_localeFunction · 0.85

Calls 3

getdefaultlocaleFunction · 0.85
_build_localenameFunction · 0.85
warnMethod · 0.45

Tested by

no test coverage detected