Тёмный
No video :(

Memory Diagrams in Python 

Kris Jordan
Подписаться 14 тыс.
Просмотров 6 тыс.
50% 1

Опубликовано:

 

20 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@patricepreudhomme5533
@patricepreudhomme5533 3 года назад
Thanks a lot, I have been learning Python with an online paying platform for one year and no one explained this. Always the basic and understand the background before to jump on frameworks and so on.....
@_BYR47
@_BYR47 2 года назад
I think this exactly what I was looking for!! I’m stuck on python it’s hard for me to describe it but it’s like I have this understanding of how the program works I have all the basics down like list strings int inputting flows of, if else, Boolean etc. slowly struggling with classes modules & objects but I know that they all coincide with each other like I have this picture or diagram that I can’t draw out from my mind that will help me better understand how this whole language and all languages on there own intertwines with itself, and would help me fully inner-stand. haven’t watched the video hope this is it tho.
@guneetmalhotra01
@guneetmalhotra01 Год назад
Can't belive i have found this golden content. Thanks Kris.
@ryanyan3563
@ryanyan3563 3 года назад
One thing can be improved in the diagram is the value should be drawn on the heap, e.g. x = 4, x is on the stack where the 4 is on the heap
@KrisJordan
@KrisJordan 3 года назад
While technically more accurate in the context of Python specifically, the intent of these models is to be reasonably generalizable such that when you think through a language such as Java you have a more familiar understanding. Since int/float/str are immutable, maintaining references in the diagram is conceptual overhead at the level we're aiming for. I appreciate the specificity, though, because your are correct!
@FaisalAkhtar
@FaisalAkhtar 3 года назад
What a fantastic video. Its surprising that it is not higher in the results.
@KrisJordan
@KrisJordan 3 года назад
Thanks Faisal! I really like the idea of your one minute video series. It's great to have quick, bite sized introductions and refreshers available as you're learning how to program.
@FaisalAkhtar
@FaisalAkhtar 3 года назад
@@KrisJordan Thanks
@wonderfulworld1128
@wonderfulworld1128 Месяц назад
I'm not understanding why we need to store function definition in heap, when all of work has to be done in stack memory???
@KrisJordan
@KrisJordan Месяц назад
@@wonderfulworld1128 functions can be passed as arguments to other functions and references to their heap definitions are what get passed around (in Python). There's nothing special about the main function in Python, you can write it to return values of you'd like.
@wonderfulworld1128
@wonderfulworld1128 Месяц назад
@@KrisJordan sir your mean to say that whenever a function def encounterd in python script python holds the name in global stack frame and it's reference is hold in the heap memory... Whenever a function is called in script a new call stake frame initialzed in stake memory and all its variables and values stores in that particular frame. My question is that when this function returning a value let say 4(immutable type) or any function inside (not been called yet), the value has to be gone to the the caller end.. and reference has been hold by the any variable let say num_result... but the return value where gone in the stack memory or heap memory?? And also the function we'd returned the definition of insided , where it gone?? Because I know whenever return statement encountered call stacks is removed and the reference it hold in heap it's all gonna be removed..sir please give me some examples to understand what's going in memory when all of this kind stuffs happens in code?? As you shared in this video like that, I would be very happy to learn something in detail???
@thile4089
@thile4089 3 года назад
At first they sounded really intimidating but now I think it’s easy peasy thanks to you! :) I still have one question though, how do we put if __name__ = “__main__”: main() in our memory diagram?
Далее
Python Modules and Packages - A Brief Introduction
13:51
Parameter Passing - Python
11:29
Просмотров 13 тыс.
МАМА И ВАЛДБЕРИС
00:48
Просмотров 590 тыс.
This Is Why Python Data Classes Are Awesome
22:19
Просмотров 801 тыс.
Stack vs Heap Memory - Simple Explanation
5:28
Просмотров 218 тыс.
Understanding Ownership in Rust
25:31
Просмотров 251 тыс.
Python Function Call Semantics
34:13
Просмотров 8 тыс.
Garbage Collection in Python: Speed Up Your Code
16:41
Memory Management in Python - The Basics
30:27
Просмотров 34 тыс.
МАМА И ВАЛДБЕРИС
00:48
Просмотров 590 тыс.