Re: str attributes

2005-12-06 Thread Bengt Richter
On 6 Dec 2005 16:52:57 -0800, [EMAIL PROTECTED] wrote: >I don't know if this was already discussed. I think that maybe Python >2.5 can add some attributes to the str object: > str.ascii_letters >'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' str.hexdigits >'0123456789abcdefABCDEF

str attributes

2005-12-06 Thread bearophileHUGS
I don't know if this was already discussed. I think that maybe Python 2.5 can add some attributes to the str object: >>> str.ascii_letters 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' >>> str.hexdigits '0123456789abcdefABCDEF' etc. And maybe this too: str.maketrans(from, to) (I think s