Python now follow LEGB rule
LEGB Rule:
L. Local. (Names assigned in any way within a fuctnion (def or lambda), and not declared global in that function.
E. Enclosing function locals. (Name in the local scope of any and all enclosing functions (def or lambda), form inner to outer.
G. Global (module). Names assigned at the top-level of [...]
Filed under: PL | Tagged: python | Leave a Comment »