Duration 16:49

Python tutorial 7: Python Namespaces and Scope

721 watched
0
25
Published 6 Aug 2021

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: https://twitter.com/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: ► /watch/023O3pgQ_cQQO Landing page: ► https://red-eyed-coder-club.github.io/courses/practical-python-web-scraping *** Other videos of the Python Tutorial Playlist *** Python Tutorial #0: Introduction, Python modules, How to run Python scripts /watch/4EUUfLMnHJ5nU Python Tutorial #1: Data Types in Python and Real World /watch/YtcYQtv1mfg1Y Python Tutorial #2: Python Strings and String methods /watch/QD_Hmfdn8SJnH Python Tutorial #3: Python Numbers Tutorial and Math operations /watch/M3PuuQBl7Culu Python Tutorial #4: Python Variables, overriding, dynamic typing in Python /watch/4n7zBueeRBeez Python tutorial #5: Immutability of strings, strings formatting /watch/c9A-fxDtZXDt- Python tutorial #6: Python FUNCTIONS Tutorial /watch/UP-unM2Cm4rCu Python tutorial #7: Python Namespaces and Scope /watch/I8ogEpCtU8Ltg Python tutorial #8: Python Boolean Tutorial and If statement /watch/sPtYqU-vibIvY Python tutorial #9: Python LISTS Tutorial /watch/4RoBvyVKpxvKB Python tutorial #10: Python FOR loops tutorial /watch/UnTZR_-HAWHHZ Python tutorial #11: Python DICTIONARIES Tutorial, None type in Python /watch/g_yCU-XOH2XOC Python tutorial #12: WHILE Loop Python Tutorial /watch/EugK7NSX5j_XK Python tutorial #13: Python FILE Handling, file objects, WITH context manager /watch/UNf0BzD1JRg10 Python tutorial #14: Python EXCEPTION Handling Tutorial /watch/8Q6X1IE3oZv3X --- Also will be useful: How to use VSCode for Python: /watch/8fsuDiLj0Hzju How to run Python scripts in Atom: /watch/YxjKwyoKz2PKK Red Eyed Coder Club (RED) channel is the best place to learn Python programming: /channel/UCh_LSaTv2GeZ3woJNTGihew Python tutorial #7: Python Namespaces and Scope | namespace in Python /watch/I8ogEpCtU8Ltg 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

Category

Show more

Comments - 1