[Python-Dev] PEP 332 revival in coordination with pep 349? [ Was:Re: release plan for 2.5 ?] (original) (raw)

Josiah Carlson jcarlson at uci.edu
Wed Feb 15 20:25:01 CET 2006


Ron Adam <rrr at ronadam.com> wrote:

Greg Ewing wrote: > Ron Adam wrote: >> b = bytes(0L) -> bytes([0,0,0,0]) > > No, bytes(0L) --> TypeError because 0L doesn't implement > the iterator protocol or the buffer interface.

It wouldn't need it if it was a direct C memory copy.

Yes it would. Python long integers are stored as arrays of signed 16-bit short ints. See longintrepr.h from the source.



More information about the Python-Dev mailing list