[Python-Dev] new buffer in python2.7

Antoine Pitrou solipsis at pitrou.net
Wed Oct 27 14:15:19 CEST 2010


On Wed, 27 Oct 2010 20:00:10 +0800
Kristján Valur Jónsson <kristjan at ccpgames.com> wrote:
> Calling getbuffer on a bytearray or a bytes object should
> be really cheap, so I still don't accept this as a matter of fact
> situation.

It *is* cheap. It's just that copying a short slice is dirt cheap as
well.

Of course, it you manipulate 1 KB slices or longer, it's different.

Regards

Antoine.


More information about the Python-Dev mailing list