There aren't many, but one of them is to temporarily assign a value to a global. That's what the OP wants, so it's not strange at all. One of the reasons it's not used much anymore is because the use of globals is discouraged. That doesn't mean there are times where the advantages of using globals outweigh the disadvantages. This appears to be one of them.