What is Scope in Python??

preview_player
Показать описание

Background Music:
Creative Commons / Attribution 3.0 Unported License (CC BY 3.0)
Рекомендации по теме
Комментарии
Автор

2:34 while this is indeed obvious for anyone experienced with interpreted languages, it could be confusing for begginers coming from compiled languages, like C, which is quite commonly used in intro to programming classes, so it's worth to point it out.

AntonioZL
Автор

Great stuff! Good to learn more about how Python "thinks" lol

NickWrightDataYT
Автор

Would have been good if you covered how scopes relate to loop bodies and if/else blocks, because it's not intuitive in python. For example, in every language which I'm familiar with besides python, a variable declared inside an if block is scoped to that block, and not accessible outside it. This is not the case in python.

armpitpuncher
Автор

Your explanation of coding is truly ingenious. Suddenly, all those encrypted coding lines aren't that confusing anymore.

chsh
Автор

Wow this was awesome. Your channel is criminally underrated!

porlando
Автор

these are VERY important things to learn, love the video and thanks for the clear + concise explanation!!

MoonFrogg
Автор

ur channel deserves more subs. Your content is amazing👍

bab
Автор

I knew of "global", but I didn't know about "nonlocal"

soniablanche
Автор

Great explanation with examples ! Bravo

I would love to see kind a approach about OOP. Because sometimes there is an overkill to use it. But otherwise its good practice i think. What do you think or whats your approach. I tend to do less OOP cause often "one time" use of my scripts

tobiasm
Автор

If there were 4 functions nested then would there be a way to access the 2nd function’s variable in the innermost 4th function?

harshaljani
Автор

I like the way you explain things. Subscribe button smashed.

alanlado
Автор

bro literally did a few vids and already 82k subs, gut 4 u

elancedin
Автор

the music is fire it got me dancing. and it remind me of minecraft

yaraa.a
Автор

1:37 by first-indentation he means that variable was defined outside of classes and functions. This part confused me too because I though that he meant 1st line.

birzhanabdikhan
Автор

Best scope explanation ever, many thanks to you

naifal-ghamdi
Автор

I didn't participate in the poll, but from very recent experience I knew it would be an error as soon as I looked at it. A couple weeks ago I was working on a script where I wanted to redefine a global variable, but I didn't use global inside the function. What's even weirder is I tried doing it with 2 different variables, and only the second one gave an error. The first variable was redefined, and printed what I was expecting, but then I got the error when trying to print the second variable. This may be a bug in Python 3.10 that I need to further explore.

eric_d
Автор

Thanks, you answered my awaited long question.

KrAsHeDD
Автор

9:17 This whole thing is a disgusting mess

TMinusRecords
Автор

Thank you for this great explaination! <3

fatiheee
Автор

Can you do a video on 360 no scope in Python next?

swaggitypigfig