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판)
153
3
장
딕셔너리와 집합
하드웨어를 프로그래밍할 때 이 클래스를 이용하는 다음과 같은 시나리오를 생각해 볼 수
있다. 구상형인
Board
서브클래스의 생성자가
pin
객체를 정의하는 매핑을 초기화하고,
mappingproxy
형으로 구현된 공개 속성인
pins
를 사용해 사용자에게
API
를 제공한다. 이렇
게 하면 사용자가 실수로 핀을 추가, 삭제, 변경할 수 없다.
다음으로, 불필요한 데이터 복사 없이
dict
에서 고성능 연산을 수행하는 뷰에 관해 알아보자.
3
.
8
딕셔너리 뷰
dict
객체 메서드인
keys(
)
,
values(
)
,
items(
)
는 각각
dict_keys
,
dict_values
,
dict_
items
형 객체를 반환한다. 이 딕셔너리 뷰들은
dict
객체에 사용된 내부 데이터 구조체의 읽
기 전용 뷰를 제공한다. 이 뷰에는 대상
dict
객체에 이미 존재하는 데이터를 복사한 리스트를
반환하는 파이썬
2
메서드들의 메모리 오버헤드가 없으며, 반복자를 반환하는 구식 메서드도
대체한다.
[예제
3
-
11
]은 모든 딕셔너리 뷰가 제공하는 몇몇 기본 연산을 보여 준다.
예제
3-11
values
()
메서드는
dict
객체의 값에 대한 뷰를 반환한다.
>>>
d = dict(a=10, b=20, c=30)
>>>
values = d.values()
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