Home
last modified time | relevance | path

Searched refs:localename (Results 1 – 6 of 6) sorted by relevance

/external/python/cpython2/Lib/
Dlocale.py365 def normalize(localename): argument
382 if isinstance(localename, _unicode):
383 localename = localename.encode('ascii')
384 code = localename.translate(_ascii_lower_map)
447 return localename
449 def _parse_localename(localename): argument
463 code = normalize(localename)
477 raise ValueError, 'unknown locale: %s' % localename
538 localename = lookup(variable,None)
539 if localename:
[all …]
/external/python/cpython3/Lib/
Dlocale.py384 def normalize(localename): argument
401 code = localename.lower()
465 return localename
467 def _parse_localename(localename): argument
481 code = normalize(localename)
495 raise ValueError('unknown locale: %s' % localename)
561 localename = lookup(variable,None)
562 if localename:
564 localename = localename.split(':')[0]
567 localename = 'C'
[all …]
/external/python/cpython3/Lib/test/
Dtest_locale.py385 def check(self, localename, expected): argument
386 self.assertEqual(locale.normalize(localename), expected, msg=localename)
389 for localename, alias in locale.locale_alias.items():
390 with self.subTest(locale=(localename, alias)):
391 self.check(localename, alias)
/external/python/cpython2/Lib/test/
Dtest_locale.py376 def check(self, localename, expected): argument
377 self.assertEqual(locale.normalize(localename), expected, msg=localename)
380 for localename, alias in locale.locale_alias.items():
381 self.check(localename, alias)
/external/python/cpython2/Doc/library/
Dlocale.rst326 .. function:: normalize(localename)
/external/python/cpython3/Doc/library/
Dlocale.rst335 .. function:: normalize(localename)