mutapath.Path.translate¶
-
Path.
translate
(table)[source]¶ Replace each character in the string using the given translation table.
- table
- Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.