[PATCH 8 of 9] util.py: Use fakebuffer as buffer in py3k

Antoine Pitrou solipsis at pitrou.net
Fri Jul 2 05:06:47 CDT 2010


Renato Cunha <renatoc <at> gmail.com> writes:
> 
> +if sys.version_info[0] == 3: # XXX: Would be better if we wrapped memoryview

What does buffer() do for you that memoryview() doesn't support?
Reusing memoryview() would certainly be better than fully copying slices around.
(I assume the reason buffer() is used in the first place is that you don't want
the memory cost associated with standard slices)




More information about the Mercurial-devel mailing list