looks like pass by reference to me... it's just that certain objects can't be changed- which has nothing to do with how it's passed to a function, and more how assignment works in python. Still a great video! I just disagree with the conclusion.
That's the discussion I wanted to spur on actually. Python.org does use the pass by assignment terminology though see these docs. docs.python.org/3/faq/programming.html#how-do-i-write-a-function-with-output-parameters-call-by-reference
Before watching the video I'd say pass by value with an asterisk. That asterisk being that every Python variable is a pointer I think, so you're passing pointers by value, which in C would be how you pass something by reference as well to some extent.
Assignment like age = 26 would not change the object anyways, it just replaces the old object with a new one. The age += 10 would be better example because it roughly translates to age.__iadd__(10) method call on the original object, possibly modifying it.
Just like java I guess. I always missing in those languages an ability to control pass type like with c++ pointers. But then I remember that pass by value is practically useless
looks like pass by reference to me... it's just that certain objects can't be changed- which has nothing to do with how it's passed to a function, and more how assignment works in python. Still a great video! I just disagree with the conclusion.
That's the discussion I wanted to spur on actually. Python.org does use the pass by assignment terminology though see these docs. docs.python.org/3/faq/programming.html#how-do-i-write-a-function-with-output-parameters-call-by-reference
such a great explanation!
glad I set a notification for a premiere)
Before watching the video I'd say pass by value with an asterisk.
That asterisk being that every Python variable is a pointer I think, so you're passing pointers by value, which in C would be how you pass something by reference as well to some extent.
Did you end up watching? Thanks for commenting!
@@ClarityCoders Yeah. Just did. That was very informative. You learn something new every day!
@@DylanMatthewTurner Thanks for watching! Love the Backstreet Boys cover keep it up man.
thanks :D excellent explanation! even on the brink of making sense for someone who started learning python 2 days ago..
Thx for the great content, i love what you do with games and its so entertaining. Keep it up man
Excellent! was wondering about this quite a bit. 👍🏻
All this makes me think of how does list reference its elements?
Assignment like age = 26 would not change the object anyways, it just replaces the old object with a new one. The age += 10 would be better example because it roughly translates to age.__iadd__(10) method call on the original object, possibly modifying it.
I actually show that example later but both create a new object. Sense integers are immutable!
Thanks
Bro make zooba game Ai plzzzz
Try changing all your friends in the list. It won't😂.
.
Thanks I agree.
Error: See line 41
Line 41: (blank)
but I only have 30 lines!?
@@ClarityCoders hah! Maybe it's line 41 of one of the modules you imported? :D
But im assuming you can pass the id? or make a variable a global variable in python like you can other languages?
Can you make a python crash course
Just like java I guess. I always missing in those languages an ability to control pass type like with c++ pointers. But then I remember that pass by value is practically useless
:) So you like the Cubs, Stephen king and your human child is an aspiring artist.
What are the other two books?
Bag of Bones, The Stand are both on that self I know my two favorite books both by Stephen King.