Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
전문가를 위한 파이썬(2판)
by
루시아누 하말류
,
강권학
November 2024
Beginner to intermediate
1064 pages
25h 21m
Korean
Hanbit Media, Inc.
Content preview from
전문가를 위한 파이썬(2판)
864
4
부
제어 흐름
이 장에서는 네이티브 코루틴과 함께 비동기 제너레이터를 집중적으로 살펴본다.
비동기 제너레이터
async def
로 정의된 제너레이터 함수이며 본체 안에서
yield
를 사용한다. 이
yield
는
__
anext__(
)
메서드를 제공하는 비동기 제너레이터 객체를 반환하는데, 이 메서드는 코루틴
에서 다음 항목을 가져올 때 사용한다.
WARNING
미래가 없는
@
asyncio
.
coroutine
고전적 코루틴과 제너레이터 기반 코루틴에 사용되던
@asyncio.coroutine
데커레이터는 파이썬
3
.
8
에
서 사용 중단 안내되었으며, 이슈
43216
(
https://fpy.li/21-2
)에 따르면 버전
3
.
11
에서 제거될 예정
이다. 이와 반대로 이슈
36921
(
https://fpy.li/21-3
)에 따라
@types.coroutine
은 남을 예정이다.
asyncio
에서는 더 지원하지 않지만,
Curio
와
Trio
비동기 프레임워크의 저수준 코드에서는 사용된다.
21
.
3
asyncio
예제: 도메인 검색
파이썬에 관한 블로그를 시작하면서, 예를 들어
await.dev
처럼
.dev
로 끝나면서 파이썬 키워
드를 사용한 도메인을 등록하려 한다고 생각해 보자. [예제
21
-
1
]은
asyncio
를 이용해 여러
도메인을 동시에 검색하는 스크립트다. 스크립트를
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판)
오현석, 미샤 고렐릭, 이안 오스발트
Publisher Resources
ISBN: 9791169211772