Steven Bethard wrote:
How often is this really necessary? Could you describe some benefits of this? I think the only time I've ever run into scoping problems is with lambda, e.g.

    [lambda x: f(x) for x, f in lst]

instead of

[lambda x, f=f: for x, f in lst]

Sorry, bad example, this should have looked something more like:

    [lambda y: f(x, y) for x, f in lst]

...

    [lambda y, x=x, f=f: f(x, y) for x, f in lst]

where you actually need the lambda.

Steve
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to