> > Do we need a UserString class? > > This will probably be useful on top of the i18n stuff in due course, > so I'd like it. > > Something Mike Da Silva and I have discussed a lot is implementing a > higher-level 'typed string' library on top of the Unicode stuff. > A 'typed string' is like a string, but knows what encoding it is in - > possibly Unicode, possibly a native encoding and embodies some basic > type safety and convenience notions, like not being able to add a > Shift-JIS and an EUC string together. Iteration would always be per > character, not per byte; and a certain amount of magic would say that > if the string was (say) Japanese, it would acquire a few extra methods > for doing some Japan-specific things like expanding half-width > katakana. > > Of course, we can do this anyway, but I think defining the API clearly > in UserString is a great idea. Agreed. Please somebody send a patch! --Guido van Rossum (home page: http://www.python.org/~guido/)
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