I don't know if this was already discussed. I think that maybe Python
2.5 can add some attributes to the str object:
[color=blue][color=green][color=darkred]
>>> str.ascii_lette rs[/color][/color][/color]
'abcdefghijklmn opqrstuvwxyzABC DEFGHIJKLMNOPQR STUVWXYZ'[color=blue][color=green][color=darkred]
>>> str.hexdigits[/color][/color][/color]
'0123456789abcd efABCDEF'
etc.
And maybe this too:
str.maketrans(f rom, to)
(I think string.capwords () isn't important enough to be added too).
Bye,
bearophile
2.5 can add some attributes to the str object:
[color=blue][color=green][color=darkred]
>>> str.ascii_lette rs[/color][/color][/color]
'abcdefghijklmn opqrstuvwxyzABC DEFGHIJKLMNOPQR STUVWXYZ'[color=blue][color=green][color=darkred]
>>> str.hexdigits[/color][/color][/color]
'0123456789abcd efABCDEF'
etc.
And maybe this too:
str.maketrans(f rom, to)
(I think string.capwords () isn't important enough to be added too).
Bye,
bearophile
Comment