List comprehension vs filter()

Chris Angelico rosuav at
Tue Apr 19 23:23:49 EDT 2011

On Wed, Apr 20, 2011 at 1:22 PM, Chris Rebert <clp2 at> wrote:
> On Tue, Apr 19, 2011 at 8:10 PM, Chris Angelico <rosuav at> wrote:
> <snip>
>> type=lst[0]["type"].lower()
> Tangent: Don't call it "type"; you're shadowing the built-in class of
> the same name.

By "shadowing" you mean that the global variable still exists, right?
I'm creating a local variable with the same name? That's how I'm
interpreting the results of changing the variable name.


More information about the Python-list mailing list