Open hydrargyrum opened 4 years ago
What's the advantage of exact_type
compared to checking the contents of the token (I can't remember the attribute - probably .string
or .text
)?
Cleaner code, clarity, using enums rather than hardcoded strings, less typo risk, easier to grep a named constant rather than a metacharacter, consistence/compatibility with code using the tokenize
standard module.
With
tokenize
module:With
asttokens
:The exact type gives a more detailed type when type is generic
OP
value.