Home
last modified time | relevance | path

Searched refs:maketrans (Results 1 – 25 of 44) sorted by relevance

12

/external/python/cpython2/Lib/
Dbase64.py56 return encoded.translate(string.maketrans(b'+/', altchars[:2]))
73 s = s.translate(string.maketrans(altchars[:2], '+/'))
98 _urlsafe_encode_translation = string.maketrans(b'+/', b'-_')
99 _urlsafe_decode_translation = string.maketrans(b'-_', b'+/')
210 s = s.translate(string.maketrans(b'01', b'O' + map01))
Dstringold.py382 def maketrans(fromstr, tostr): function
429 from strop import maketrans, lowercase, uppercase, whitespace
Dstring.py61 def maketrans(fromstr, tostr): function
530 from strop import maketrans, lowercase, uppercase, whitespace
Dtextwrap.py82 whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace))
Dxmllib.py73 attrtrans = string.maketrans(' \r\n\t', ' ')
/external/tensorflow/tensorflow/python/profiler/
Dpprof_profiler.py54 maketrans = string.maketrans variable
56 maketrans = str.maketrans variable
439 maketrans('/:', '__'))
/external/python/cpython3/Lib/
Dbase64.py61 return encoded.translate(bytes.maketrans(b'+/', altchars))
84 s = s.translate(bytes.maketrans(altchars, b'+/'))
108 _urlsafe_encode_translation = bytes.maketrans(b'+/', b'-_')
109 _urlsafe_decode_translation = bytes.maketrans(b'-_', b'+/')
212 s = s.translate(bytes.maketrans(b'01', b'O' + map01))
Dshlex.py65 t = self.wordchars.maketrans(dict.fromkeys(punctuation_chars))
/external/tensorflow/tensorflow/tools/test/
Drun_and_gather_logs.py24 from string import maketrans
86 file_name = (name.strip("/").translate(maketrans("/:", "__")) +
/external/python/cpython3/Lib/test/
Dtest_unicode.py326 tbl = self.type2test.maketrans({'a': None, 'b': '<i>'})
329 tbl = self.type2test.maketrans('abc', 'xyz', 'd')
334 self.assertEqual("[a]".translate(str.maketrans('a', 'X')),
336 self.assertEqual("[a]".translate(str.maketrans({'a': 'X'})),
338 self.assertEqual("[a]".translate(str.maketrans({'a': None})),
340 self.assertEqual("[a]".translate(str.maketrans({'a': 'XXX'})),
342 self.assertEqual("[a]".translate(str.maketrans({'a': '\xe9'})),
344 self.assertEqual('axb'.translate(str.maketrans({'a': None, 'b': '123'})),
346 self.assertEqual('axb'.translate(str.maketrans({'a': None, 'b': '\xe9'})),
350 self.assertEqual("[a]".translate(str.maketrans({'a': '<\xe9>'})),
[all …]
Dtest_funcattrs.py388 self.assertEqual(str.maketrans.__qualname__, 'str.maketrans')
389 self.assertEqual(bytes.maketrans.__qualname__, 'bytes.maketrans')
Dtest_bytes.py737 self.assertEqual(self.type2test.maketrans(b'abc', b'xyz'), transtable)
739 self.assertEqual(self.type2test.maketrans(b'\375\376\377', b'xyz'), transtable)
740 self.assertRaises(ValueError, self.type2test.maketrans, b'abc', b'xyzq')
741 self.assertRaises(TypeError, self.type2test.maketrans, 'abc', 'def')
/external/python/cpython2/Lib/test/
Dtest_strop.py108 self.assertTrue(strop.maketrans("abc", "xyz") == transtable)
109 self.assertRaises(ValueError, strop.maketrans, "abc", "xyzq")
Dtest_string.py95 self.assertEqual(string.maketrans('abc', 'xyz'), transtable)
96 self.assertRaises(ValueError, string.maketrans, 'abc', 'xyzq')
Dstring_tests.py1322 string.maketrans('abc', 'xyz')
1324 self.assertRaises(ValueError, string.maketrans, 'abc', 'xyzw')
1327 table = string.maketrans('abc', 'xyz')
1330 table = string.maketrans('a', 'A')
/external/python/cpython2/Lib/plat-riscos/
Drourl2path.py10 __slash_dot = string.maketrans("/.", "./")
/external/python/cpython2/Lib/distutils/
Dfancy_getopt.py31 longopt_xlate = string.maketrans('-', '_')
408 WS_TRANS = string.maketrans(string.whitespace, ' ' * len(string.whitespace))
/external/autotest/client/site_tests/graphics_GLMark2/
Dgraphics_GLMark2.py29 description_table = string.maketrans(':,=;', '.-__')
/external/webrtc/tools/sslroots/
Dgenerate_sslroots.py181 translation_table = string.maketrans(bad_chars, replacement_chars)
/external/python/cpython3/Doc/whatsnew/
D3.1.rst154 * The :func:`string.maketrans` function is deprecated and is replaced by new
155 static methods, :meth:`bytes.maketrans` and :meth:`bytearray.maketrans`.
158 :class:`bytearray` each have their own **maketrans** and **translate**
/external/python/cpython3/Lib/distutils/
Dfancy_getopt.py27 longopt_xlate = str.maketrans('-', '_')
/external/python/cpython3/Lib/collections/
D__init__.py1245 maketrans = str.maketrans variable in UserString
/external/python/cpython2/Lib/distutils/command/
Dbuild_ext.py632 all_dots = string.maketrans('/'+os.sep, '..')
/external/autotest/client/bin/
Dpartition.py790 return names.translate(string.maketrans('[]', ' ')).split()
/external/python/cpython3/Misc/NEWS.d/
D3.5.0b1.rst205 casefold(), format_map(), isprintable(), and maketrans(). Patch by Joe

12