Skip to Content
전문가를 위한 파이썬(2판)
book

전문가를 위한 파이썬(2판)

by 루시아누 하말류, 강권학
November 2024
Beginner to intermediate
1064 pages
25h 21m
Korean
Hanbit Media, Inc.
Content preview from 전문가를 위한 파이썬(2판)
881
21
비동기 프로그래밍
to_do_iter = asyncio.as_completed(to_do) ❹
if not verbose:
to_do_iter = tqdm.tqdm(to_do_iter, total=len(cc_list)) ❺
error: httpx.HTTPError | None = None ❻
for coro in to_do_iter: ❼
try:
status = await coro ❽
except httpx.HTTPStatusError as exc:
error_msg = ‘HTTP error {resp.status_code} - {resp.reason_phrase}’
error_msg = error_msg.format(resp=exc.response)
error = exc ❾
except httpx.RequestError as exc:
error_msg = f’{exc} {type(exc)}’.strip()
error = exc ❿
except KeyboardInterrupt:
break
if error:
status = DownloadStatus.ERROR ⓫
if verbose:
url = str(error.request.url) ⓬
cc = Path(url).stem.upper() ⓭
print(f’{cc} error: {error_msg}’) ...
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.
Start your free trial

You might also like

전문가를 위한 리액트

전문가를 위한 리액트

테자스 쿠마르
고성능 파이썬(2판)

고성능 파이썬(2판)

오현석, 미샤 고렐릭, 이안 오스발트

Publisher Resources

ISBN: 9791169211772