[Python-Dev] buffer('abc') == 'abc' is False ?! (original) (raw)

M.-A. Lemburg mal@lemburg.com
Wed, 16 Oct 2002 17:45:02 +0200


Guido van Rossum wrote:

The above just was a hint not to deprecate the buffer object until we've come up with a decent replacement that's easy to adapt in existing code.

So, apart from the Python 2.1 requirement, subclassing str does the trick, right?

Right.

Would be nice if there were a standard builtin, e.g. binary(), for this and maybe some support code to go with it in C (e.g. the type object would be nice to have at C level).

-- Marc-Andre Lemburg CEO eGenix.com Software GmbH


eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/