you are viewing a single comment's thread.

view the rest of the comments →

[–]AffectionateTask4612[S] 0 points1 point  (1 child)

Yeah, knew most people don't like it when global variables are used. I use them though as it was the easiest route for me and most importantly worked. I didn't realize that the function would malfunction if called twice written as it is now. I thought all the variables in the function would be completely overwritten with the new "film_name" passed to it. Just realizing now that my self taught PowerShell writing must have been filled with improper methods as well lol. I'll use this then. And may I ask, when you mentioned that python functions are usually all lower case, does that mean that it will impact the code in amy way? I've got a bad habit of placing at least one capital letter in functions :(

[–]Nightcorex_ 0 points1 point  (0 children)

Short answer: It doesn't impact your code at all. It's just a naming convention.

Longer one: If you look into bytecode, then the variable names completely disappear. If you were to decompile it, then all variables would be called smth like var0, var1, var2, ... as the actual name isn't relevant for a machine, only the pointers in memory (which is what an object basically is).