[Python-Dev] Changes in semantics to str()?
M.-A. Lemburg
mal@lemburg.com
Mon, 02 Oct 2000 20:35:27 +0200
Guido van Rossum wrote:
>
> I guess Thomas has settled the fate of my str() patch -- UserString
> won't be dealt with properly. I hereby withdraw the patch.
>
> (I'm not sure what Marc-Andre means by buffer objects whose str() is
> long but whose repr() is short, but it's probably a similar issue.)
>
Example for the record:
>>> b = buffer('long string')
>>> b
<read-only buffer for 0x82a0160, ptr 0x82a0174, size 11 at 0x82db170>
>>> l = [b]
>>> l
[<read-only buffer for 0x82a0160, ptr 0x82a0174, size 11 at 0x82db170>]
>>> [str(b)]
['long string']
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/