+ 1
How does adding comments affect the memory usage?
Is it recommended to not comment heavily on the code?
5 Respuestas
+ 4
comments are for people, programs ignore them.
they don't really increase memory usage - they exist only on hard drive (in text file with script), but not in RAM, where programs are running
you can use as much comments as it needs to explain your code - either to yourself or to someone else. and commenting your code IS recommended, especially in more complex projects
0
I did not know that
0
would not it be true if the program was compiled? I mean Python code is interpreted, the file is indeed read line by line so it is loaded into the RAM memory. Right?
0
I think that when the program is compiled the compiler hits the pound symbol and ignores everything after it so it wouldn't be in the ram
0
I think that the compiler utilize the RAM to storage this.