[Python-Dev] Re: deprecating string module?

François Pinard pinard@iro.umontreal.ca
30 May 2002 09:24:44 -0400


[Guido van Rossum]

> [...] I don't think that the data objects have any other function except
> for membership testing [...]

This is useful being able to quickly enumerate letters, or digits.
Just yesterday, I wrote:

            contexte = {}
            for nom, valeur in map(None,
                                   string.uppercase[:len(valeur)],
                                   valeur):
                assert valeur in '01', valeur
                contexte[nom] = valeur != '0'

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard