[Python-3000] Dict literal bytecode
Terry Reedy
tjreedy at udel.edu
Sat Mar 29 06:01:31 CET 2008
"Greg Ewing" <greg.ewing at canterbury.ac.nz> wrote in message
news:47ED70D2.6030509 at canterbury.ac.nz...
Marcin Qrczak Kowalczyk wrote:
> What about lists? I guess (haven't checked) that they are made like
> tuples.
I always thought they were built one item at a time,
but I was wrong (see below). So there doesn't seem to
be much logic or consistency here at all.
====================
Would it be possible to consistently build all such builtin collections in
bunches of say 256 items (or 128 pairs)? Such a 'compromise' between the
efficient 'all-at-once' and the safer 'one-at-a-time' methods would
effectively be 'all-at-once' for perhaps 99% of literals without imposing
arbitrary limits on extreme cases.
tjr
More information about the Python-3000
mailing list