MCPcopy Index your code
hub / github.com/python/cpython / different_locale

Class different_locale

Lib/calendar.py:620–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618
619
620class different_locale:
621 def __init__(self, locale):
622 self.locale = locale
623 self.oldlocale = None
624
625 def __enter__(self):
626 self.oldlocale = _locale.setlocale(_locale.LC_TIME, None)
627 _locale.setlocale(_locale.LC_TIME, self.locale)
628
629 def __exit__(self, *args):
630 _locale.setlocale(_locale.LC_TIME, self.oldlocale)
631
632
633def _get_default_locale():

Callers 5

_get_default_localeFunction · 0.85
formatweekdayMethod · 0.85
formatmonthnameMethod · 0.85
formatweekdayMethod · 0.85
formatmonthnameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…