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판)
778
4
부
제어 흐름
EAFP
스타일을 따른다면
try
/
except
문에서
else
블록을 알고 제대로 사용하는 편이 훨씬
더 자연스럽다.
NOTE
match
문에 관해 이야기할 때, 필자를 포함한 일부 사람들은 여기에도
else
절이
있어야 한다고 생각했다. 그러나 결국 필요 없다는 결론이 나왔다.
case _:
문이 바로 그
일을 하기 때문이다.
13
이제 이 장을 마무리할 때가 되었다.
18
.
5
요약
이 장은 콘텍스트 관리자와
with
문의 의미에서 시작해 열린 파일을 자동으로 닫는 일반적인
용법보다 고차원적인 용법을 알아보았다. 그러고 나서
__enter__(
)
/
__exit__(
)
메서드가
있는 커스텀 콘텍스트 관리자
LookingGlass
클래스를 구현하고
__exit__(
)
메서드 안에서
예외를 처리하는 방법을 살펴보았다. 레이먼드 해팅거가 파이콘
US
2013
키노트에서 발표한
내용의 핵심은
with
문이 단지 리소스 관리용이 아니라, 공통적인 준비와 마무리 작업 또는 다
른 프로시저의 앞과 뒤에서 수행해야 할 연산을 인수분해하는 도구라는 것이다.
14
그리고
contextlib
표준 라이브러리 모듈에 있는 함수들을 살펴보았다. 그중 하나인
@
contextmanager
데커레이터는 하나의
yield
문이 있는 간단한 제너레이터를 이용해 콘텍스 ...
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