Files
andrey.matveevandintellij-monorepo-bot d66e0eec0e PY-10184 Impl hasattr support
GitOrigin-RevId: e5826372ddfe233656097da774d978c57ee54937
2019-12-23 13:08:30 +00:00

2 lines
94 B
Python

def foo(x):
some_var = (x.<caret> if hasattr(x, "foo") else 42) if hasattr(x, "bar") else 42