오는 표현식에도 사용할 수 있다. 비동기 콘솔에서 찾아낸 도메인만 모은 지능형 집합을 정의
하면 다음과 같다.
>>> {name for name in names if (await probe(name)).found}
{‘rust-lang.org’, ‘python.org’, ‘golang.org’}
__getattr__()
연산자인
.
(점)의 우선순위가 높으므로
await
표현식 앞뒤를 괄호로 에워싸
야 했다.
이 모든 지능형은
async ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.