10 ms·
Python is intentionally simple to parse. The whitespace thing (if that's what you're referring to) goes like this: if a line is indented one more level than the
by etal 18y ago
Python is intentionally simple to parse. The whitespace thing (if that's what you're referring to) goes like this: if a line is indented one more level than the previous line, that span of indentation becomes an <indent> token, applied for the rest of the indented block. So to figure out scope level for a given line, look at the number of leading <indent> tokens. That's it. Google knows more.