[docs] Undocumented feature - should be documented.
bob gailer
bgailer at gmail.com
Fri Nov 1 14:49:46 CET 2013
According to the FM:
"str.translate(map)
Return a copy of the s where all characters have been mapped through the map
which must be a dictionary of Unicode ordinals (integers) to Unicode
ordinals, strings or None. Unmapped characters are left untouched.
Characters mapped to None are deleted."
So 'acxd'.translate(' '*97 + 'sdfg') should raise an exception, as the
map is NOT a dictionary.
However it runs and returns 'sfxg' This is a very nice feature - let's
document it!
--
Bob Gailer
919-636-4239
Chapel Hill NC
More information about the docs
mailing list