"Greg Ewing" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] 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. >>> def f(): ... x = [1,2,3] ... >>> from dis import dis >>> dis(f) 2 0 LOAD_CONST 1 (1) 3 LOAD_CONST 2 (2) 6 LOAD_CONST 3 (3) 9 BUILD_LIST 3 12 STORE_FAST 0 (x) 15 LOAD_CONST 0 (None) 18 RETURN_VALUE -- Greg
_______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com