From: "Guido van Rossum" <guido@python.org> > > What shall we Silently Deprecate? > > > > string module > > Yes, after providing substitutes. I commented on the substitutes patch, www.python.org/sf/561832, but thought it would be better to kick the idea around here on Py-dev. Instead of making direct substitutes for the character lists, I propose we take advantage of the opportunity and provide them as mappings rather than strings. That way, we can get O(1) behavior instead of O(n) behavior for code like: if c in str.printable: c='*'. If someone needs to know the contents, they can run str.printable.keys(). Also, because the dictionary is mutable, someone can (at runtime) expand or contract the definitions: str.whitespace.append('_'). Raymond Hettinger
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4