SlideShare a Scribd company logo
Python 3.10の新機能を
俯瞰してみる
Python駿河 勉強会 #28 ~真夏のLT大会~
2021/08/28@オンライン
あっきー
自己紹介
● 株式会社KYOSO勤務
○ IoTのワンストップサービスなど
● 業務では主に、AWS、SORACOM、
AIカメラを使ったサービスを提供
● バックエンド、フロントエンド両方好き
● 推し言語はPythonとTypeScript
● VTuber好き、Dead by Daylight好き
AWS LambdaにPython 3.9来たよー🎉
本日お話しする内容
先日Python 3.10 RCが公開されたのでその内容をざっくりとみていきたいと思いま
す
発表時間が5分なので駆け足で進めますのであしからず
https://docs.python.org/3.10/whatsnew/3.10.html
目次
https://docs.python.org/3.10/whatsnew/3.10.html
Structural Pattern Matching
● PEP 634, Structural Pattern Matching: Specification
● PEP 635, Structural Pattern Matching: Motivation and Rationale
● PEP 636, Structural Pattern Matching: Tutorial
パターンマッチという新しい文法が追加された
これまでもIF,ELIF,ELSEを用いて同様のことが実現可能だったが、よりわかりやすく
記述することが可能になった
Structural Pattern Matching
従来の記法 パターンマッチ使った場合
Parenthesized context managers
● bpo-12782, Parenthesized context managers are now officially allowed.
複数のファイルをオープンしたいときなどに使うwith、かっこを使ってまとめること
ができるようになったよ
じつは3.9でも動いていたけど公式採用されたよ
Parenthesized context managers
従来の記法 新しい記法
Add Optional Length-Checking To zip
● PEP 618, Add Optional Length-Checking To zip
ZIP関数使うときはほとんどが引数の長さが同じ
逆に長さが異なっている場合に発生する不具合の特定が非常に困難なので何と
かしたい
ということで、引数の長さをチェックするstrictフラグ追加したよ
Add Optional Length-Checking To zip
Add Optional Length-Checking To zip
Precise line numbers for debugging and other
tools
● PEP 626, Precise line numbers for debugging and other tools.
これまでデバッガツールなどで表示される行番号が想定と異なる場合があった
が、正確な行番号が表示されるように修正
行番号を取得するf_linenoオブジェクトの動作を改善???
※これに関しては正確に内容が理解できなかったので間違ってたらすみませ
ん。。。。
Allow writing union types as X | Y
● PEP 604, Allow writing union types as X | Y
Union[X, Y] を X | Y って書けるようにしました
Allow writing union types as X | Y
従来の記法
新しい記法
Parameter Specification Variables
● PEP 612, Parameter Specification Variables
typingにParamSpecを追加しました。
デコレータ等でより詳細な型指定ができます。
詳細な解説をすると時間超えそうなので省略、、、
TypeAlias
● PEP 613: TypeAlias
typingにTypeAlias追加しました

More Related Content

Similar to Python 3.10の新機能を 俯瞰してみる

PYTHON FOR BEGINNERS (BASICS OF PYTHON)
PYTHON FOR BEGINNERS (BASICS OF PYTHON)PYTHON FOR BEGINNERS (BASICS OF PYTHON)
PYTHON FOR BEGINNERS (BASICS OF PYTHON)
HemaArora2
 
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Edureka!
 
python programming.pptx
python programming.pptxpython programming.pptx
python programming.pptx
Kaviya452563
 
IRJET- Why Python Rocks for Research....???
IRJET- Why Python Rocks for Research....???IRJET- Why Python Rocks for Research....???
IRJET- Why Python Rocks for Research....???
IRJET Journal
 
what is python ?
what is python ? what is python ?
what is python ?
NetmaxTechnologies1
 
python_tutorial.pdf
python_tutorial.pdfpython_tutorial.pdf
python_tutorial.pdf
amgadmonir1
 
Python 3 - Tutorialspoint Full Cource Book.pdf
Python 3 - Tutorialspoint Full Cource Book.pdfPython 3 - Tutorialspoint Full Cource Book.pdf
Python 3 - Tutorialspoint Full Cource Book.pdf
AbdikadirAbdirahman4
 
Python_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfPython_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdf
bhagyashri686896
 
Python_final_print_batch_II_vision_academy (1).pdf
Python_final_print_batch_II_vision_academy (1).pdfPython_final_print_batch_II_vision_academy (1).pdf
Python_final_print_batch_II_vision_academy (1).pdf
rupaliakhute
 
Python_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfPython_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdf
sannykhopade
 
Python_vision_academy notes
Python_vision_academy notes Python_vision_academy notes
Python_vision_academy notes
rajaniraut
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
SudhanshiBakre1
 
Python Programming Draft PPT.pptx
Python Programming Draft PPT.pptxPython Programming Draft PPT.pptx
Python Programming Draft PPT.pptx
LakshmiNarayanaReddy48
 
Python training in mysore
Python training in mysorePython training in mysore
Python training in mysore
PragadeeshvaranSubra
 
Why Python is the Best Coding Language For PWA Development_.ppt
Why Python is the Best Coding Language For PWA Development_.pptWhy Python is the Best Coding Language For PWA Development_.ppt
Why Python is the Best Coding Language For PWA Development_.ppt
Techinventive Software
 
Python_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdfPython_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdf
VisionAcademyProfSac
 
SRT Prometheus Exporter Introduction.pdf
SRT Prometheus Exporter Introduction.pdfSRT Prometheus Exporter Introduction.pdf
SRT Prometheus Exporter Introduction.pdf
Tomoya Fujita
 
Introduction to python3.pdf
Introduction to python3.pdfIntroduction to python3.pdf
Introduction to python3.pdf
Mohammed Aman Nawaz
 
Python. Why to learn?
Python. Why to learn?Python. Why to learn?
Python. Why to learn?
Oleh Korkh
 
Getting Started with Python
Getting Started with PythonGetting Started with Python
Getting Started with Python
Emily Dong
 

Similar to Python 3.10の新機能を 俯瞰してみる (20)

PYTHON FOR BEGINNERS (BASICS OF PYTHON)
PYTHON FOR BEGINNERS (BASICS OF PYTHON)PYTHON FOR BEGINNERS (BASICS OF PYTHON)
PYTHON FOR BEGINNERS (BASICS OF PYTHON)
 
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
 
python programming.pptx
python programming.pptxpython programming.pptx
python programming.pptx
 
IRJET- Why Python Rocks for Research....???
IRJET- Why Python Rocks for Research....???IRJET- Why Python Rocks for Research....???
IRJET- Why Python Rocks for Research....???
 
what is python ?
what is python ? what is python ?
what is python ?
 
python_tutorial.pdf
python_tutorial.pdfpython_tutorial.pdf
python_tutorial.pdf
 
Python 3 - Tutorialspoint Full Cource Book.pdf
Python 3 - Tutorialspoint Full Cource Book.pdfPython 3 - Tutorialspoint Full Cource Book.pdf
Python 3 - Tutorialspoint Full Cource Book.pdf
 
Python_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfPython_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdf
 
Python_final_print_batch_II_vision_academy (1).pdf
Python_final_print_batch_II_vision_academy (1).pdfPython_final_print_batch_II_vision_academy (1).pdf
Python_final_print_batch_II_vision_academy (1).pdf
 
Python_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfPython_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdf
 
Python_vision_academy notes
Python_vision_academy notes Python_vision_academy notes
Python_vision_academy notes
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Python Programming Draft PPT.pptx
Python Programming Draft PPT.pptxPython Programming Draft PPT.pptx
Python Programming Draft PPT.pptx
 
Python training in mysore
Python training in mysorePython training in mysore
Python training in mysore
 
Why Python is the Best Coding Language For PWA Development_.ppt
Why Python is the Best Coding Language For PWA Development_.pptWhy Python is the Best Coding Language For PWA Development_.ppt
Why Python is the Best Coding Language For PWA Development_.ppt
 
Python_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdfPython_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdf
 
SRT Prometheus Exporter Introduction.pdf
SRT Prometheus Exporter Introduction.pdfSRT Prometheus Exporter Introduction.pdf
SRT Prometheus Exporter Introduction.pdf
 
Introduction to python3.pdf
Introduction to python3.pdfIntroduction to python3.pdf
Introduction to python3.pdf
 
Python. Why to learn?
Python. Why to learn?Python. Why to learn?
Python. Why to learn?
 
Getting Started with Python
Getting Started with PythonGetting Started with Python
Getting Started with Python
 

More from hiroya akita

KyotoLT_Online_27.pdf
KyotoLT_Online_27.pdfKyotoLT_Online_27.pdf
KyotoLT_Online_27.pdf
hiroya akita
 
はんなりPython #45
はんなりPython #45はんなりPython #45
はんなりPython #45
hiroya akita
 
KyotoLT(Online) 第26回
KyotoLT(Online) 第26回KyotoLT(Online) 第26回
KyotoLT(Online) 第26回
hiroya akita
 
AppSync導入のすすめ
AppSync導入のすすめAppSync導入のすすめ
AppSync導入のすすめ
hiroya akita
 
みんなのPython勉強会#62
みんなのPython勉強会#62みんなのPython勉強会#62
みんなのPython勉強会#62
hiroya akita
 
はんなりpython#32
はんなりpython#32はんなりpython#32
はんなりpython#32
hiroya akita
 
Hannari python#27
Hannari python#27Hannari python#27
Hannari python#27
hiroya akita
 
変数の重要度ってどうやったらわかるん?
変数の重要度ってどうやったらわかるん?変数の重要度ってどうやったらわかるん?
変数の重要度ってどうやったらわかるん?
hiroya akita
 
みんなのはんなりPython勉強会
みんなのはんなりPython勉強会みんなのはんなりPython勉強会
みんなのはんなりPython勉強会
hiroya akita
 
Pythonでも型をつけたいだけの人生だった
Pythonでも型をつけたいだけの人生だったPythonでも型をつけたいだけの人生だった
Pythonでも型をつけたいだけの人生だった
hiroya akita
 
Lt debian 20190526
Lt debian 20190526Lt debian 20190526
Lt debian 20190526
hiroya akita
 

More from hiroya akita (11)

KyotoLT_Online_27.pdf
KyotoLT_Online_27.pdfKyotoLT_Online_27.pdf
KyotoLT_Online_27.pdf
 
はんなりPython #45
はんなりPython #45はんなりPython #45
はんなりPython #45
 
KyotoLT(Online) 第26回
KyotoLT(Online) 第26回KyotoLT(Online) 第26回
KyotoLT(Online) 第26回
 
AppSync導入のすすめ
AppSync導入のすすめAppSync導入のすすめ
AppSync導入のすすめ
 
みんなのPython勉強会#62
みんなのPython勉強会#62みんなのPython勉強会#62
みんなのPython勉強会#62
 
はんなりpython#32
はんなりpython#32はんなりpython#32
はんなりpython#32
 
Hannari python#27
Hannari python#27Hannari python#27
Hannari python#27
 
変数の重要度ってどうやったらわかるん?
変数の重要度ってどうやったらわかるん?変数の重要度ってどうやったらわかるん?
変数の重要度ってどうやったらわかるん?
 
みんなのはんなりPython勉強会
みんなのはんなりPython勉強会みんなのはんなりPython勉強会
みんなのはんなりPython勉強会
 
Pythonでも型をつけたいだけの人生だった
Pythonでも型をつけたいだけの人生だったPythonでも型をつけたいだけの人生だった
Pythonでも型をつけたいだけの人生だった
 
Lt debian 20190526
Lt debian 20190526Lt debian 20190526
Lt debian 20190526
 

Recently uploaded

Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
itech2017
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
dxobcob
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 

Recently uploaded (20)

Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 

Python 3.10の新機能を 俯瞰してみる