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)
| 627 | return _setlocale(category, locale) |
| 628 | |
| 629 | def 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 | |
| 650 | try: |
no test coverage detected