DEV Community

Discussion on: Don't mess with default Python scoping

Collapse
 
rhymes profile image
rhymes • Edited

It's pretty rare indeed to use global or nonlocal in day to day programming

The few times it happened to me was kinda the result of improper design in the interface of the code. Over the years I switched to a mostly functional style of programming in Python so no globals as much as possible