Issue 1033720: buffer() object broken. (original) (raw)

This bug breaks Twisted.

print str(buffer(buffer("asdf", 0), 0, 131072))

On Python < 2.4, this prints 'asdf' as it should. On Python 2.4, this prints '', as it most certainly should not.

It may have something to do with: Python 2.4a2 (#61, Sep 9 2004, 22:24:36)

buffer("asdf", 0) <read-only buffer for 0x40234360, size -1, offset 0 at 0x40234280> (size -1, WTF??)

vs.

Python 2.3.4 (#2, Jul 5 2004, 09:15:05)

buffer("asdf", 0) <read-only buffer for 0x402194a0, ptr 0x402194b4, size 4 at 0x40219460>