When doing “From X import Y”, how does python “find” variable Y? /u/ZombieSurvivor365 Python Education

Does python iterate line-by-line to find variable Y? If variable Y is on line 500 and the previous 499 lines is just one big function, does it skip past the function? Or does it look through each 500 lines until it finds variable Y? Or does each .py file have an index system where it does a “goto” for each variable Y? So, if I have a 50,000-line file, and I’m importing a function on line 44,000, does it just skip past all the BS to line 44,000?

submitted by /u/ZombieSurvivor365
[link] [comments]

​r/learnpython Does python iterate line-by-line to find variable Y? If variable Y is on line 500 and the previous 499 lines is just one big function, does it skip past the function? Or does it look through each 500 lines until it finds variable Y? Or does each .py file have an index system where it does a “goto” for each variable Y? So, if I have a 50,000-line file, and I’m importing a function on line 44,000, does it just skip past all the BS to line 44,000? submitted by /u/ZombieSurvivor365 [link] [comments] 

Does python iterate line-by-line to find variable Y? If variable Y is on line 500 and the previous 499 lines is just one big function, does it skip past the function? Or does it look through each 500 lines until it finds variable Y? Or does each .py file have an index system where it does a “goto” for each variable Y? So, if I have a 50,000-line file, and I’m importing a function on line 44,000, does it just skip past all the BS to line 44,000?

submitted by /u/ZombieSurvivor365
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *