Skip to content

Commit

Permalink
Merge branch 'driazati/compbuiltins' of github.com:pytorch/pytorch in…
Browse files Browse the repository at this point in the history
…to driazati/raises
  • Loading branch information
Your Name committed Mar 21, 2020
2 parents 4ce66c3 + 3a46c1e commit 95c8efb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/jit/_builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ def _find_builtin(fn):
# indicates that when resolving, we should skip these so they dispatch to
# the correct sugared representation
def _is_python_builtin(maybe_builtin):
return hasattr(maybe_builtin, '__name__') and hasattr(builtins, maybe_builtin.__name__)
return hasattr(maybe_builtin, '__name__') and getattr(builtins, maybe_builtin.__name__, None) == maybe_builtin

0 comments on commit 95c8efb

Please sign in to comment.