--- Tim Peters <tim_one@email.msn.com> wrote: > I'm more baffled about what "abc" should do. I > didn't understand the t#/s# > etc arguments, and how those do or don't relate to > what str() does. On the > face of it, the idea that a gazillion and one > distinct encodings all get > lumped into "a string object" without remembering > their nature makes about > as much sense as if Python were to treat all > instances of all user-defined > classes as being of a single InstanceType type > <wink> -- except in the > latter case you at least get a __class__ attribute > to find your way home > again. Well said. When the core stuff is done, I'm going to implement a set of "TypedString" helper routines which will remember what they are encoded in and won't let you abuse them by concatenating or otherwise mixing different encodings. If you are consciously working with multi-encoding data, this higher level of abstraction is really useful. But I reckon that can be done in pure Python (just overload '%;, '+' etc. with some encoding checks). - Andy ===== Andy Robinson Robinson Analytics Ltd. ------------------ My opinions are the official policy of Robinson Analytics Ltd. They just vary from day to day. __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com
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