Hi, Chuck! Thank you for explaining these concepts. I've been learning django dev since quarantine began. This has been super helpful in moving to the next level. Thanks!~
At 7:00 did you know that del is a language keyword? It's not a function. The parenthesis is not required and it makes it look like a function, but it's not.
Thanks. Nice to learn something new. I made an assumption given the function kerfuffle around print - but makes perfect sense when thinking of the Python OO model. Feels inconsistent. Looking at len() it does appear inconsistent. Ah well. I will only use it with parenthesis to show solidarity with print () and len() :) Thanks again.
@@ChuckSeverance there's a fundamental difference between len() & print() on one side and del on the other: it's possible to write your own version of len() and print(), len is trivial whereas print is more involved, but it's not possible to write an implementation for del(). Why? because "del" calls __delitem__() on the dictionary itself but when it's a function, calling "del(some_dict[key])" passes one argument to the del() function: the value stored at some_dict[key] however del() needs to act on the dictionary itself, not on the value, but the relationship is gone once we've dereferenced the dictionary and obtained the value. del is a bastard legacy: it's meant to operate on variables (local and global variables are contained in dictionaries) but when used on an object it calls __delitem__()... depite looking like other languages, it's confusing for beginners when they learn python data model and "everything is an object" philosophy. I'd prefered have del be a proper function similar to getattr() and hasattr() for example named delitem() In any case, thanks for the django videos :)
Excellent explanation. Lifted the hood on something I thought would have been a lot more complicated than it seemed - thanks 👍
You should consider a donation tab, your tutorials are excellent!
Hi, Chuck! Thank you for explaining these concepts. I've been learning django dev since quarantine began. This has been super helpful in moving to the next level. Thanks!~
you give learner knowledge, not just some codelines, thank prof.
Very informative Sir. Thanks for sharing your knowledge
very clear explanation. I watched a few videos about sessions and this one is easiest to understand.
Hello from Russia and thank you very mush for amazing explanation.Your channel is great
I liked the way of clarity in your video , Thanks for sharing info
:)
Very informative, thanks for posting
I laughed at 0:28 because the image immediately reminded me of a Rube Goldberg machine. Thanks for simplifying things, though.
excellent explanation 👍👍👍
That is a very powerful delivery of knowledge, keep posting more lectures. I just subscribed your channel and look forward to more of such lectures ;D
Thank you for the knowledge
I just commented to say love you Charles
Awesome explanation. Thanks for the video
Really loved the explanation.
Thanks so much for such a great explanation. Hope your channel grow bigger
Very useful explanation. Thank you.
7:15 Actually, it's going to count 1-2-3-4-5 before the deletion happens.
TYSM
thanks a lot.
Thanks!
At 7:00 did you know that del is a language keyword? It's not a function. The parenthesis is not required and it makes it look like a function, but it's not.
Thanks. Nice to learn something new. I made an assumption given the function kerfuffle around print - but makes perfect sense when thinking of the Python OO model. Feels inconsistent. Looking at len() it does appear inconsistent. Ah well. I will only use it with parenthesis to show solidarity with print () and len() :) Thanks again.
@@ChuckSeverance there's a fundamental difference between len() & print() on one side and del on the other: it's possible to write your own version of len() and print(), len is trivial whereas print is more involved, but it's not possible to write an implementation for del(). Why? because "del" calls __delitem__() on the dictionary itself but when it's a function, calling "del(some_dict[key])" passes one argument to the del() function: the value stored at some_dict[key] however del() needs to act on the dictionary itself, not on the value, but the relationship is gone once we've dereferenced the dictionary and obtained the value.
del is a bastard legacy: it's meant to operate on variables (local and global variables are contained in dictionaries) but when used on an object it calls __delitem__()... depite looking like other languages, it's confusing for beginners when they learn python data model and "everything is an object" philosophy.
I'd prefered have del be a proper function similar to getattr() and hasattr() for example named delitem()
In any case, thanks for the django videos :)
@@unperrier5998 Thanks for the clarification. I rarely use del so that is why I never dug into the detail.
Thanks!