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판)
130
1
부
데이터 구조체
TIP
파이썬
3
.
8
이나 그 이전 버전의 코드를 유지보수해야 한다면
‘
PEP
584
–
dict
에 합집합 연산자 추
가
Add
Union
Operators
To
dict
’
문서(
https
://
fpy
.
li
/
pep584
)
의
‘
동기
Motivation
’ 절(
https
://
fpy
.
li
/
3
-
1
)
을
참조하라. 매핑을 병합하는 다른 방법을 잘 요약했다.
이제 패턴 매칭을 매핑에 적용하는 방법을 알아보자.
3
.
3
매핑을 이용한 패턴 매칭
match
/
case
문은 대상이 매핑 객체일 때도 지원한다. 매핑에 대한 패턴은
dict
리터럴처럼 보
이지만,
collections.abc.Mapping
의 서브클래스
2
나 가상 서브클래스이면 어떠한 객체도 매
칭할 수 있다.
2
장에서는 시퀀스 패턴만 살펴봤지만, 다른 자료형의 패턴도 조합하거나 중첩할 수 있다. 구
조 분해 덕분에 패턴 매칭은 중첩된 매핑이나 시퀀스 등 레코드 형태의 구조체
(
JSON
API
나 몽고
DB
MongoDB
, 에지
DB
EdgeDB
,
PostgreSQL
등 어느 정도 구조를 갖춘 스키마가 있는 데
이터베이스에서 읽어온 데이터
)
도 처리할 수 있는 강력한 도구가 되었다
(
예제
3
-
2
)
.
get_
creators(
)
의 간단한 자료형 힌트를 통해 이 함수가
dict
형을 인수로 받아
list
형을 반환
함을 알 ...
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