[Python-3000] Dict literal bytecode

Neal Norwitz nnorwitz at gmail.com
Fri Mar 28 19:11:11 CET 2008


On Fri, Mar 28, 2008 at 9:46 AM, Marcin 'Qrczak' Kowalczyk
<qrczak at knm.org.pl> wrote:
> Dnia 27-03-2008, Cz o godzinie 11:48 +1200, Greg Ewing pisze:
>
>
>  > Tuples are created batchwise because, being immutable,
>  > that's the only way to do it. But if set literals are
>  > to produce mutable objects, there's no need for them
>  > to be created batchwise, and doing so has unfortunate
>  > stack size and memory use consequences in the worst case.
>
>  What about lists? I guess (haven't checked) that they are made like
>  tuples. If so, has it caused problems with the stack size? If not,
>  perhaps we should not worry about dicts either.

r27219 | nnorwitz | 2002-06-13 18:07:39 -0700 (Thu, 13 Jun 2002) | 5 lines

Fix SF bug # 561858 Assertion with very long lists

Write 4 bytes for co_stacksize, etc. to prevent writing out
bad .pyc files which can cause a crash when read back in.

n


More information about the Python-3000 mailing list