mal wrote: =20 > Do you really think this proliferation of issomething() > methods is a good idea ? >=20 > The same can be had using re.metch() with *much* more flexibility > since you're not stuck with an "intuitive" definition relying > on the intuition of some non-standard body. >=20 > FWIW, I've never used a single one of these single > character based classification APIs. The only non-trivial > issomething() method I can think of is .istitle() because > of it's complicated definition. All others can easily > be had with re.match(). I fully agree. the SRE engine already supports character classes based on ASCII, the current locale (via ctype.h), and the Unicode char- set. we should probably add more classes -- at least the full list of POSIX [:name:] classes, and probably also unicode categories. fwiw, I've played with adding "charset" objects to SRE, which would allow you to plug in custom [:spam:] sets as well (e.g. xml name chars). </F>
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