Python tutorial #7: Python Namespaces and Scope

Publicado em: 06 Agosto 2021
no canal de: Red Eyed Coder Club
915
31

This Python Namespaces and Scope tutorial is about what is namespace in Python, what is scope in Python, and why they are needed.
What is the difference between Python namespaces and scopes.

Python Namespace is a dictionary that contains names (function names, variables names, class names etc.) and their values. The value of such Python name is an address in memory where the certain object is located.
Python Scope is a path of search - where Python looks for a name's definition.

In this video:
a function's parameters in Python are local variables,
what is a Python namespaces
what is a Python scope,
LEGB,
Why do we need namespaces in Python

This video is the 8th video of my Python in depth tutorial.


Follow me @:
Telegram: https://t.me/red_eyed_coder_club
Twitter:   / codereyed  
Facebook: https://fb.me/redeyedcoderclub

Timecodes:

00:00 - Beginning
00:28 - Python local variables. In Python parameters of a function are the local variables of the function.
02:37 - Encountering Python namespace. Python functions create a new namespace to store local variables in it.
05:17 - What is Python namespace?
08:06 - How does Python figure out in which namespace it should write a specific name, and its value? The place where an assignment is performed determines the namespace where the name will be located.
08:40 - What is a Python scope? LEGB - local, enclosed, global, built-ins.
14:21 - The Python's scope determines in which namespace Python will look for a particular name, and in what order Python will look for it.


For all new Python developers is highly recommended to complete this course:
►    • Python Practice Course: Web Scraping ...  

Landing page:
► https://red-eyed-coder-club.github.io...


** Other videos of the Python Tutorial Playlist **

Python Tutorial #0: Introduction, Python modules, How to run Python scripts
   • Python Tutorial #0: Introduction, Pyt...  

Python Tutorial #1: Data Types in Python and Real World
   • Python Tutorial #1: Data Types in Pyt...  

Python Tutorial #2: Python Strings and String methods
   • Python Tutorial #2: Python Strings an...  

Python Tutorial #3: Python Numbers Tutorial and Math operations
   • Python Tutorial #3: Python Numbers Tu...  

Python Tutorial #4: Python Variables, overriding, dynamic typing in Python
   • Python Tutorial #4: Python Variables,...  

Python tutorial #5: Immutability of strings, strings formatting
   • Python tutorial #5: Immutability of s...  

Python tutorial #6: Python FUNCTIONS Tutorial
   • Python tutorial #6: Python Functions ...  

Python tutorial #7: Python Namespaces and Scope
   • Python tutorial #7: Python Namespaces...  

Python tutorial #8: Python Boolean Tutorial and If statement
   • Python tutorial #8: Python Boolean Tu...  

Python tutorial #9: Python LISTS Tutorial
   • Python tutorial #9: Python Lists Tuto...  

Python tutorial #10: Python FOR loops tutorial
   • Python tutorial #10: Python For loops...  

Python tutorial #11: Python DICTIONARIES Tutorial, None type in Python
   • Python tutorial #11: Python Dictionar...  

Python tutorial #12: WHILE Loop Python Tutorial
   • Python tutorial #12: While Loop in Py...  

Python tutorial #13: Python FILE Handling, file objects, WITH context manager
   • Python tutorial #13: Python File Hand...  

Python tutorial #14: Python EXCEPTION Handling Tutorial
   • Python tutorial #14: Python Exception...  

---

Also will be useful:
How to use VSCode for Python:
   • VSCode Tutorial: Python VSCode, Visua...  

How to run Python scripts in Atom:
   • Atom Python Tutorial: Setting Up Atom...  

Red Eyed Coder Club (RED) channel is the best place to learn Python programming:
   / @redeyedcoderclub  

Python tutorial #7: Python Namespaces and Scope | namespace in Python
   • Python tutorial #7: Python Namespaces...  

This video is about scope and namespace in Python - what is namespace in Python and what is scope in Python. What is the difference between Python's scope and namespace.

#python #pythontutorial #redeyedcoderclub #pythonnamespaces #pythonscope


Nesta página do site você pode assistir ao vídeo on-line Python tutorial #7: Python Namespaces and Scope duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Red Eyed Coder Club 06 Agosto 2021, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 915 vezes e gostou 31 espectadores. Boa visualização!