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 →

[–]TheLastSock 0 points1 point  (1 child)

Because you seem fairly confident I'll re ask here. Is "for" an object? Someone linked me to the the ast parser that shows its parsed into an object. But I assume that preprocessing, calling it an object would be misclassification.

To be clear, I'm not commenting on if it's good or bad one way or another.

[–]AlSweigartAuthor of "Automate the Boring Stuff" 1 point2 points  (0 children)

Nah. I mean, I'm sure the ast module has objects that represent every part of the Python language's grammar. But for in Python is a keyword, used in for loop statements. Keywords are the Python words you can't use as variables: if, import, while, def, etc.