Wishlist: string attributes

Alex Martelli aleax at aleax.it
Tue Mar 25 11:29:04 EST 2003


Stephen Boulet wrote:

> Being a big fan of string methods, here's what I'd like to see for python
> strings:
> 
> I can access string methods like (str.lower) but I would like to be able
> to access all string module attributes without importing the string module
> (like str.ascii_lowercase, str.whitespace, etc.).
> 
> Not being a guru, are there any good reasons against?

None, really.  I'm sure a patch to the str object to expose these
class attributes would be well received.


Alex





More information about the Python-list mailing list