Closure in Python | What are the Benefits of Closure in Python Programming
Опубликовано: 14 Октябрь 2024 на канале: Bhavatavi
9
0
Closures can avoid use of global variables and provides some form of data hiding. Eg. When there are few methods in a class, use closures instead. Also, Decorators in Python make extensive use of closures.