What do _ast Load | Store | Del | AugLoad | AugStore | Param mean?

Eloff dan.eloff at gmail.com
Sun Oct 12 05:38:42 CEST 2008


On Oct 11, 9:22 pm, Benjamin <musiccomposit... at gmail.com> wrote:
> Load:
> a = 2
> Module(body=[Assign(targets=[Name(id='a', ctx=Store())],
> value=Num(n=2))])
>
> Store:
> print a
> Module(body=[Print(dest=None, values=[Name(id='a', ctx=Load())],
> nl=True)])
>
> Del:
> del a
> Module(body=[Delete(targets=[Name(id='a', ctx=Del())])])
>
> Param:
> def f(a): pass
> Module(body=[FunctionDef(name='f', args=arguments(args=[Name(id='a',
> ctx=Param())], vararg=None, kwarg=None, defaults=[]), body=[Pass()],
> decorator_list=[])])
>
> I hope that helps!
>

Very much! Thank you for such a clear explanation!

Cheers,
-Dan






More information about the Python-list mailing list