def fake_set_locale(category, value=None, original_setlocale=locale.setlocale):
 if (value not in (None, '', 'C', 'POSIX')):
  raise locale.Error('locale emulation only supports "C" locale')
 return original_setlocale(category, 'C')

def fake_set_locale ( category , value = None , original_setlocale = locale . setlocale ) : if ( value not in ( None , '' , 'C' , 'POSIX' ) ) : raise locale . Error ( 'locale emulation only supports "C" locale' ) return original_setlocale ( category , 'C' )
fake version of locale .