filmov
tv
Closures in Python | Python in Hindi | #78

Показать описание
Closure in Python:
===============
A closure is an inner function that remembers it has access to variables in the local scopes in which it's created, even after the outer function scope has finished its execution.
In conclusion here are the three criteria for a closure:
===========================================
There must be a nested function (a function inside another function).
This nested function has to refer to a variable defined inside the enclosing function.
The enclosing function must return the nested function.
Practical use cases are discussed in session, please watch the full video.
For Nested function in python and non-local concepts, watch the session using the link given below
#codewithdaneyal #pythonprogramming #pythoninhindi #python
===============
A closure is an inner function that remembers it has access to variables in the local scopes in which it's created, even after the outer function scope has finished its execution.
In conclusion here are the three criteria for a closure:
===========================================
There must be a nested function (a function inside another function).
This nested function has to refer to a variable defined inside the enclosing function.
The enclosing function must return the nested function.
Practical use cases are discussed in session, please watch the full video.
For Nested function in python and non-local concepts, watch the session using the link given below
#codewithdaneyal #pythonprogramming #pythoninhindi #python