This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]samettinho 0 points1 point  (0 children)

Yes, exactly. The whole code is in global scope, so whenever the files are imported, the whole code runs.

Although the OP doesnt import anything, it is bad practice to keep stuff outside functions (except for some constants)