str attributes

Bengt Richter bokr at oz.net
Tue Dec 6 21:49:28 EST 2005


On 6 Dec 2005 16:52:57 -0800, bearophileHUGS at lycos.com 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'
>etc.
>
>And maybe this too:
>str.maketrans(from, to)
>
>(I think string.capwords() isn't important enough to be added too).
>
I agree. I hope good stuff from string module gets moved
It has been discussed, of course ;-)

go to http://groups.google.com and put

   "string module"  "str" group:comp.lang.python

in the seach slot.


Regards,
Bengt Richter



More information about the Python-list mailing list