> How common is it for a local variable to be bound in > more than one place within a function?
It's more natural for a beginner to read or write .mystr = "" .for snippet in snippets: . if ilike(snippet): . mystr = mystr + snippet than .mylist = [] .for snippet in snippets: . if ilike(snippet): . mylist.append(snippet) .mystr = "".join(mylist) for instance. While the latter is superior in some ways, I frequently find my fingers tossing off the former approach. Of course in this case it's not hard to come up with mystr = "".join([snippet in snippets if ilike(snippet)]) but it's also not too hard to imagine cases where the list comprehension would be too complex or would require too much refactoring. I don't know that it's ever necessary to rebind, but it is, in fact, common, and perhaps too easy. In numeric Python, avoiding rebinding turns out to be a nontrivial skill. mt -- http://mail.python.org/mailman/listinfo/python-list