Тёмный

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

Real Python
Подписаться 194 тыс.
Просмотров 21 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 16   
@Indraw705
@Indraw705 2 года назад
Why Did not covered what is namespaces ??? you started from type of namespaces...
@Mysticbeing21
@Mysticbeing21 2 года назад
i was about to ask that
@kcvinu
@kcvinu Год назад
Really helpful. Thanks a lot for your effort. The best example for a good teaching style.
@RiccardoScribano
@RiccardoScribano Год назад
Amazing video, very useful! Unrelated: are you dutch? :D
@tymothylim6550
@tymothylim6550 3 года назад
Thank you very much for this video! It is very educational :)
@CR33D404
@CR33D404 Год назад
I have a little question why is the print function not copied to the local namespace ?
@mejiger
@mejiger 2 года назад
Excellent video thanks !
@init1508
@init1508 2 года назад
Where is the next episode? I need it...
@carlabest1257
@carlabest1257 3 года назад
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"...
@v4n5h4j
@v4n5h4j 3 года назад
Hi, may I ask what other languages you were referring to when you said "python doesn't truly have anything resembling global variables as defined in other programming languages".
@racecarjonny8460
@racecarjonny8460 2 года назад
@@v4n5h4j I think C++ and JS can be taken as example for that.
@FilthySnob
@FilthySnob Год назад
i like how u call underscores as dunders or w/e lol so funny
@odinmay6009
@odinmay6009 3 года назад
Great info! Thanks this makes it very clear and is super helpful.
@joeking5211
@joeking5211 Год назад
????????????????????????? so what is a namespace, it looks like a JSON string to me, do we need to use it when programming python ?????
@reatter
@reatter Год назад
The namespace is a Python dictionary, which contains key-value pairs, which are variable identifiers as keys and their values. That it looks like JSON is just because it's logically the same structure, and the print function in Python is apparently overloaded to display dicts like this.
@Iztheticgaming
@Iztheticgaming 2 года назад
1.5x speed ^.^
Далее
What is Scope in Python??
10:25
Просмотров 52 тыс.
Python Namespaces
15:13
Просмотров 9 тыс.
ДУБАЙСКАЯ ШОКОЛАДКА 🍫
00:55
Просмотров 2,2 млн
Using Python enumerate() With for Loops
14:01
Просмотров 25 тыс.
If __name__ == "__main__" for Python Developers
8:47
Просмотров 410 тыс.
This Is Why Python Data Classes Are Awesome
22:19
Просмотров 811 тыс.
Python Namespace Explained - Python Tutorial #9
14:26
Просмотров 4,4 тыс.
Python Decorators in 15 Minutes
15:14
Просмотров 448 тыс.
What is Python scope resolution? 🔬
5:34
Просмотров 33 тыс.
Zig for Impatient Devs
9:48
Просмотров 98 тыс.
6 CLEAN Tips To IMPROVE Your Python Functions
9:55
Просмотров 80 тыс.