[Python-Dev] String encoding
M.-A. Lemburg
mal@lemburg.com
Tue, 23 May 2000 19:15:17 +0200
Fredrik Lundh wrote:
>
> M.-A. Lemburg <mal@lemburg.com> wrote:
> > > before proceeding down this (not very slippery but slightly
> > > unfortunate, imho) slope, I think we should decide whether
> > >
> > > assert eval(repr(s)) == s
> > >
> > > should be true for strings.
>
> footnote: as far as I can tell, the language reference says it should:
> http://www.python.org/doc/current/ref/string-conversions.html
>
> > This is a different discussion which I don't really want to
> > get into... I don't have any need for repr() being locale
> > dependent, since I only use it for debugging purposes and
> > never to rebuild objects (marshal and pickle are much better
> > at that).
>
> in other words, you leave it to 'pickle' to call 'repr' for you ;-)
Ooops... now this gives a totally new ring the changing
repr(). Hehe, perhaps we need a string.encode() method
too ;-)
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/