> From: python-dev-bounces+tdelaney=avaya.com at python.org > > I guess the tests should be faster, yes, but I would still > want _iterables_ for ascii_* and digits. > > One issue with allowing "if char in string.letters:" is that > these days this will not raise if the alleged 'char' is more > than one character -- it will give True for (e.g.) 'ab', False > for (e.g.) 'foobar', since it tests _substrings_. # inside string.py or equivalent ... import sets ascii_letters = sets.Set(ascii_letters) Hmm - we'd have the iterability, individual characters and speed, but lose iterating in order. I'm sure there's things out there that rely on iterating over ascii_letters in order ... ;) Tim Delaney
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