Ethan Furman writes: > Likewise: > > for val in some_iterator: > use(val) > > bar(val) > > will shadow foo.val Yes, I understand that. What I don't understand is your statement that you would like "if expr as val:" if it *doesn't* shadow.