mal wrote: > Fredrik Lundh wrote: > > > > mal wrote: > > > I've just checked in new string methods > > > > talking about string methods: how about providing an > > "encode" method for 8-bit strings too? > > I've tossed that idea around a few times too... it could > have the same interface as the Unicode one (without default > encoding though). The only problem is that there are currently > no codecs which could deal with strings on input. imho, a consistent interface is more important than a truly optimal implementation (string are strings yada yada). or in other words, def encode(self, encoding): if encoding is close enough: return self return unicode(self).encode(encoding) ought to be good enough for now. </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