shadows name from outer scope

Daiyue Weng daiyueweng at gmail.com
Tue Oct 11 11:50:07 EDT 2016


Hi, I have the following code structure,

def one_func(param1, param2, param3):

    process_outcome = {'dict': None}


    outcome = another_func(param1, process_outcome, db_host=param2,
funcs_to_run=param3)

PyCharm warns me

Shadows name from outer scope

on every variable here, param1,2,3, process_outcome.

I am wondering how to resolve the issues, and is it vital to have variables
not shadowed?

cheers



More information about the Python-list mailing list