[fx] make const fold code more pythonic (#64451)
authorYinghai Lu <yinghai@fb.com>
Wed, 8 Sep 2021 20:50:46 +0000 (13:50 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 8 Sep 2021 20:55:10 +0000 (13:55 -0700)
commitb12150608e7ee3e29bfd0fed6b97891f97513bf1
tree29e73ae187e339071dee371340095e2e3bed198f
parent24e1315d4b0b4d064472868afe8ae492e25887b8
[fx] make const fold code more pythonic (#64451)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/64451

No functional change.

Test Plan:
```
buck test caffe2/test:fx_const_fold
```

Reviewed By: jfix71, RoshanPAN, houseroad

Differential Revision: D30718255

fbshipit-source-id: 95f98561c7f33fcc6c839db68683c85eb152c949
test/fx/test_fx_const_fold.py
torch/fx/experimental/const_fold.py