Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace hasattr with getattr in faiar_cair/simmc/simmc_github/mm_dst/…
…gpt2_dst/scripts/run_language_modeling.py Summary: The pattern ``` X.Y if hasattr(X, "Y") else Z ``` can be replaced with ``` getattr(X, "Y", Z) ``` The [getattr](https://www.w3schools.com/python/ref_func_getattr.asp) function gives more succinct code than the [hasattr](https://www.w3schools.com/python/ref_func_hasattr.asp) function. Please use it when appropriate. **This diff is very low risk. Green tests indicate that you can safely Accept & Ship.** Differential Revision: D44886469 fbshipit-source-id: d5819d8d710624b012fbb28139fe42c1aa2f5432
- Loading branch information