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

Function setlocale

Lib/locale.py:86–92  ·  view source on GitHub ↗

setlocale(integer,string=None) -> string. Activates/queries locale processing.

(category, value=None)

Source from the content-addressed store, hash-verified

84 'int_frac_digits': 127}
85
86 def setlocale(category, value=None):
87 """ setlocale(integer,string=None) -> string.
88 Activates/queries locale processing.
89 """
90 if value not in (None, '', 'C'):
91 raise Error('_locale emulation only supports "C" locale')
92 return 'C'
93
94# These may or may not exist in _locale, so be sure to set them.
95if 'strxfrm' not in globals():

Callers 13

setUpMethod · 0.90
_testFunction · 0.85
getpreferredencodingFunction · 0.85
_print_localeFunction · 0.85
setUpMethod · 0.85
tearDownMethod · 0.85
numeric_testerMethod · 0.85
test_lc_numeric_basicMethod · 0.85
test_era_nl_langinfoMethod · 0.85

Calls 3

_build_localenameFunction · 0.85
ErrorClass · 0.70
normalizeFunction · 0.70

Tested by 10

setUpMethod · 0.72
setUpMethod · 0.68
tearDownMethod · 0.68
numeric_testerMethod · 0.68
test_lc_numeric_basicMethod · 0.68
test_era_nl_langinfoMethod · 0.68
test_float_parsingMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…