all() is slow?

Ian Kelly ian.g.kelly at gmail.com
Wed Nov 9 21:10:27 EST 2011


On Wed, Nov 9, 2011 at 6:26 PM, Devin Jeanpierre <jeanpierreda at gmail.com> wrote:
> The use of exec also results in (seemingly) arbitrary constraints on
> the input. Like, why can't "--" be a name? Because exec? Is there some
> other reason?

That's by design, not because of exec.  The names are supposed to be
actual Python names, things that can used to designate keyword
arguments ("MyTuple(foo=42)") or to retrieve elements using attribute
lookup ("my_tuple.foo").  Using "--" as a name would be a syntax error
in either of those cases.

Cheers,
Ian



More information about the Python-list mailing list