slyubomirsky commented on code in PR #13630: URL: https://github.com/apache/tvm/pull/13630#discussion_r1051152722
########## python/tvm/script/parser/core/parser.py: ########## @@ -150,7 +150,7 @@ def add(self, var: str, value: Any, allow_shadowing: bool = False): The options of whether variable shadowing allwed for this variable. """ # Skip if the key and value are equal to those in the var_table - if self.name2value[var] and self.name2value[var][-1] == value: + if self.name2value[var] and self.name2value[var][-1] is value: return Review Comment: I believe the `is` operator checks reference equality rather than value equality. For integers, it will just check equality, so @lightzhan-intellif is correct. Whether it's preferred style is another question -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org