for ns in namespaces: if name in ns: print("Found!") break elif name.isupper(): print("All-caps name that wasn't found")
This actually doesn't work. I have been programming in Python for well over a decade, and never before been in a situation where this would be useful. As YAGNIs go, this is right up there. (For the record, since this was the last thing in the function, I just made the break a return. Alternatively, an extra indentation level "else: if name.isupper():" wouldn't have been that terrible.) Your random piece of amusement for today. ChrisA -- https://mail.python.org/mailman/listinfo/python-list