Why use "locals()"

Sean DiZazzo half.italian at gmail.com
Fri Sep 18 23:17:01 CEST 2009

On Sep 18, 9:55 am, Simon Forman <sajmik... at gmail.com> wrote:
> On Mon, Sep 14, 2009 at 1:12 AM, Sean DiZazzo <half.ital... at gmail.com> wrote:
> > Thanks for your explanation Steven.  I see how it can be valuable, but
> > it seems to always break the second rule of Zen.  I don't really want
> > to get into the code of debuggers, but I guess I can see how they
> > might have no other way to know what local variables have been set.
> > ~Sean
> The zeroth "rule" of zen is "don't take the rules so seriously".
> "They're really more like guidelines anyway."
> Regards,
> ~simon

Yeah.  I think I was just a bit randy at that moment.  I realized that
the (*args,**kwargs) idiom is very similar and I use it all the


More information about the Python-list mailing list