Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб Python Namespace Explained - Python Tutorial #9 в хорошем качестве

Python Namespace Explained - Python Tutorial #9 6 лет назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



Python Namespace Explained - Python Tutorial #9

I've switched mostly to blogging and you can find it here: http://danielmuellerkomorowska.com/bl... Here we are dealing with the concept of namespace in python. For now the namespace is the collection of all the names that we assign while programming and all the names that are built into python. When we assign a name to an object a new name is created in the namespace and the object is created in object-space. The name references the object so the name knows where the object lives in object-space. The object-space really is the memory of the computer. There are two different types of objects in python: immutable and mutable objects. Immutable objects are unchangeable. Mutable objects are changeable. However, for both types of objects we can always change the object that the name references. We can change the reference by simply reassigning the same name. This makes is looks like we changed the object without changing the original object at its place in memory. Mutable objects allow us to change them in-place. That is, we can change the object at its original location in memory. This opens us to some problems. For example when two names reference the same object and we change the object through one of those names, the object as seen through the other name is changed as well. This can cause some bugs that are fairly easy to catch but only when you understand how assignments and namespaces work. Python: https://www.python.org/ Outro Song: Alright by Silent Partner is part of the YouTube Audio Library.

Comments