filmov
tv
Python tutorial #7: Python Namespaces and Scope
Показать описание
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 @:
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:
Landing page:
*** Other videos of the Python Tutorial Playlist ***
Python Tutorial #0: Introduction, Python modules, How to run Python scripts
Python Tutorial #1: Data Types in Python and Real World
Python Tutorial #2: Python Strings and String methods
Python Tutorial #3: Python Numbers Tutorial and Math operations
Python Tutorial #4: Python Variables, overriding, dynamic typing in Python
Python tutorial #5: Immutability of strings, strings formatting
Python tutorial #6: Python FUNCTIONS Tutorial
Python tutorial #7: Python Namespaces and Scope
Python tutorial #8: Python Boolean Tutorial and If statement
Python tutorial #9: Python LISTS Tutorial
Python tutorial #10: Python FOR loops tutorial
Python tutorial #11: Python DICTIONARIES Tutorial, None type in Python
Python tutorial #12: WHILE Loop Python Tutorial
Python tutorial #13: Python FILE Handling, file objects, WITH context manager
Python tutorial #14: Python EXCEPTION Handling Tutorial
---
Also will be useful:
How to use VSCode for Python:
How to run Python scripts in Atom:
Red Eyed Coder Club (RED) channel is the best place to learn Python programming:
Python tutorial #7: Python Namespaces and Scope | namespace in Python
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
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 @:
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:
Landing page:
*** Other videos of the Python Tutorial Playlist ***
Python Tutorial #0: Introduction, Python modules, How to run Python scripts
Python Tutorial #1: Data Types in Python and Real World
Python Tutorial #2: Python Strings and String methods
Python Tutorial #3: Python Numbers Tutorial and Math operations
Python Tutorial #4: Python Variables, overriding, dynamic typing in Python
Python tutorial #5: Immutability of strings, strings formatting
Python tutorial #6: Python FUNCTIONS Tutorial
Python tutorial #7: Python Namespaces and Scope
Python tutorial #8: Python Boolean Tutorial and If statement
Python tutorial #9: Python LISTS Tutorial
Python tutorial #10: Python FOR loops tutorial
Python tutorial #11: Python DICTIONARIES Tutorial, None type in Python
Python tutorial #12: WHILE Loop Python Tutorial
Python tutorial #13: Python FILE Handling, file objects, WITH context manager
Python tutorial #14: Python EXCEPTION Handling Tutorial
---
Also will be useful:
How to use VSCode for Python:
How to run Python scripts in Atom:
Red Eyed Coder Club (RED) channel is the best place to learn Python programming:
Python tutorial #7: Python Namespaces and Scope | namespace in Python
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
Комментарии