Python 3.0 and removal of the 'string' module

Terry Reedy tjreedy at udel.edu
Fri Jul 11 01:09:34 EDT 2008



Ben Finney wrote:
> Howdy all,
> 
> The Python wiki page states on its page for Python 3.0
> <URL:http://wiki.python.org/moin/Python3.0>, in the section for
> "Standard Library Changes"
> <URL:http://wiki.python.org/moin/Python3.0#head-40dd57e6561cce0b209ef49f8ce86030c6313113>,
> that the 'string' module is to be removed.
> 
> It references PEP 4 <URL:http://www.python.org/dev/peps/pep-0004>,
> which has nothing to say about the status of the 'string' module.
> 
> Further, the 'string' module has existing functionality (the Template
> class, the character sets 'whitespace' etc.) that, to my knowledge,
> has no replacement in Python 3.0.
> 
> Can anyone see a reason to believe the above wiki page's statement
> about the 'string' module being removed? More to the point, can anyone
> see a reason why that statement should remain on that page?

Removing string and moving the functionality elsewhere was considered, 
but...

IDLE 3.0b1
 >>> import string
 >>> dir(string)
['Formatter', 'Template', '_TemplateMetaclass', '__builtins__', 
'__doc__', '__file__', '__name__', '__package__', '_multimap', '_re', 
'ascii_letters', 'ascii_lowercase', 'ascii_uppercase', 'capwords', 
'digits', 'hexdigits', 'maketrans', 'octdigits', 'printable', 
'punctuation', 'whitespace']

Feel free to edit the wiki.





More information about the Python-list mailing list