> What about del team[2]?
>
> There is no name involved here, and even a reference to team[2] won't help.

(I'm not sure quite what question is asking. Apologies if my
assumption was incorrect.)

That is precisely why del is a statement. At byte-compile time, both
"team" and "2" are available. The easiest way to see this is to define
a simple function:

def f(team):
    del team[2]

Now, import the dis module and call

dis.dis(f)

then check out the byte code assembler statements.

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to