Namespaces in Python: Built-in, Global, Enclosing, and Local

preview_player
Показать описание
What are the namespaces in Python? In a program of any complexity, you’ll create hundreds or thousands of names, each pointing to a specific object. How does Python keep track of all these names so that they don’t interfere with one another? This video covers Python namespaces, the structures used to organize the symbolic names assigned to objects in a Python program.

Рекомендации по теме
Комментарии
Автор

Thank you very much for this video! It is very educational :)

tymothylim
Автор

Really helpful. Thanks a lot for your effort. The best example for a good teaching style.

kcvinu
Автор

Great info! Thanks this makes it very clear and is super helpful.

odinmay
Автор

Amazing video, very useful! Unrelated: are you dutch? :D

ymwzxqt
Автор

i like how u call underscores as dunders or w/e lol so funny

sfsf
Автор

I have a little question why is the print function not copied to the local namespace ?

CRD
Автор

Where is the next episode? I need it...

init
Автор

Why Did not covered
what is namespaces ???
you started from type of namespaces...

Indraw
Автор

Since you are working with an interactive version of python,
you fail to mention which namespace is being referenced when
executing globals().

In a multi module application (most applications) merely executing
globals() at the interactive prompt gives different results depending
on where it is executed. The truth is that globals() is accessing
the "current" namespace or "current" module.

Python took a perfectly good word - "globals" - and is using that word
to really mean "module" scope.

Python, does not truly have anything resembling "global" variables
or "global" functions as defined in other programming languages.
This difference is an ongoing source of confusion and quirky programming
errors. I suggest you consder multi module applications when you speak of "globals"...

carlabest
Автор

so what is a namespace, it looks like a JSON string to me, do we need to use it when programming python

joeking