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

Function _append_modifier

Lib/locale.py:375–386  ·  view source on GitHub ↗
(code, modifier)

Source from the content-addressed store, hash-verified

373 return langname + '.' + encoding
374
375def _append_modifier(code, modifier):
376 if modifier == 'euro':
377 if '.' not in code:
378 # Linux appears to require keeping the "@euro" modifier in place,
379 # even when using the ".ISO8859-15" encoding.
380 return code + '.ISO8859-15@euro'
381 _, _, encoding = code.partition('.')
382 if encoding == 'UTF-8':
383 return code
384 if encoding == 'ISO8859-1':
385 code = _replace_encoding(code, 'ISO8859-15')
386 return code + '@' + modifier
387
388def normalize(localename):
389

Callers 1

normalizeFunction · 0.85

Calls 2

_replace_encodingFunction · 0.85
partitionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…