filmov
tv
Python for beginners tutorial 19 : Scopes and Namespaces in Python
![preview_player](https://i.ytimg.com/vi/ONMF6goXp4Q/maxresdefault.jpg)
Показать описание
A namespace is a mapping from names to objects implemented as dictionaries in Python (i.e unique name for each and every object).
Namespaces are created at different moments and have different lifetimes.
A scope is a textual region of a Python program where a namespace is directly accessible.
A lifetime of a namespace depends upon the scope of objects, if the scope of an object ends, the lifetime of the namespace also ends.
We have four types of scopes and namespaces:
Local
Enclosed
Global
Built-in
Python for beginners tutorial in english
learn Python
Python course
Data Science Path:
Get certified from Google:
Get certified from Meta:
Disclosure:
I may receive a commission if you click on and purchase from one of the links above.
Namespaces are created at different moments and have different lifetimes.
A scope is a textual region of a Python program where a namespace is directly accessible.
A lifetime of a namespace depends upon the scope of objects, if the scope of an object ends, the lifetime of the namespace also ends.
We have four types of scopes and namespaces:
Local
Enclosed
Global
Built-in
Python for beginners tutorial in english
learn Python
Python course
Data Science Path:
Get certified from Google:
Get certified from Meta:
Disclosure:
I may receive a commission if you click on and purchase from one of the links above.