SlideShare a Scribd company logo
{
Python  2  vs.  Python  3	
“event”:      “Python  BCN  Meetup  –  Beginners  session”	
“author”:  “Pablo  Enfedaque”	
“twi6er”:  “@pablitoev56”
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
>  December  1989:  Guido  Van  Rossum  starts  
Python  implementation	
>  January  1994:  Version  1.0  released	
>  October  2000:  Version  2.0  released	
>  December  2008:  Version  3.0  released	
>  June  2009:  Version  3.1  released	
>  July  2010:  Version  2.7  released  with  backports	
>  2014:  current  versions  are  2.7.6  and  3.4	
Python  versions
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
>  December  1989:  Guido  Van  Rossum  starts  
Python  implementation	
>  January  1994:  Version  1.0  released	
>  October  2000:  Version  2.0  released	
>  December  2008:  Version  3.0  released	
>  June  2009:  Version  3.1  released	
>  July  2010:  Version  2.7  released  with  backports	
>  2014:  current  versions  are  2.7.6  and  3.4	
WTF?!
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Python  3  is	
backwards  incompatible
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
>  Backwards  incompatibilities	
>  print  and  exec  become  functions	
>  All  classes  are  new-­‐‑style	
>  Massive  usage  of  generators  instead  of  lists	
>  All  text  (str)  is  Unicode  and  encoded  text  is  
binary  data  (bytes)	
>  Other  minor  changes  in  std  lib	
Python  3.0
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Why  Python  3?
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Mainly  because  of  encodings	
Why  Python  3?
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Google:  Python  encoding  sucks
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Google:  Python  3  sucks
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Really  because  of  encodings??	
Why  Python  3?
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Why  should  I  move  to  Python  3?
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
>  Proper  encoding	
>  asyncio	
>  enums	
>  Standard  library  virtualenvs	
>  Exception  chaining	
>  Single-­‐‑dispatch	
>  uni6est.mock	
>  contextlib	
>  “Be6er”  GIL	
>  concurrent.futures	
>  selectors  module	
>  Qualified  names	
>  …	
Python  3.4  new  features  (vs.  2.7)
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Why  people  don’t  use  Python  3?
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Why  people  don’t  use  Python  3?	
No  dependencies  ported
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Why  people  don’t  use  Python  3?	
Laziness?
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
>  Great  features  are  waiting  us  in  Python  3	
>  We  are  beyond  half  the  planned  life  of  Python  2.7	
>  Python  2.6  is  officially  retired  with  2.6.9  release	
>  Most  3rd  party  dependencies  already  in  Python  3	
>  Or  we  could  return  to  OSS  all  that  we  have  been  given	
>  hZps://caniusepython3.com	
>  Porting  to  Python  3  is  not  such  a  big  deal	
>  In  most  of  the  cases	
>  So,  no  more  excuses	
>  It’s  time  to  start  moving  to  Python  3	
Conclusions
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Conclusions
{  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”}	
	
Q&A	
Thanks  for  coming!	
	
	
Slides:  
h6ps://speakerdeck.com/pablito56/
python-­‐‑2-­‐‑vs-­‐‑python-­‐‑3  

More Related Content

What's hot

Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)Pedro Rodrigues
 
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaPython Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaEdureka!
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming pptismailmrribi
 
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Edureka!
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming LanguageTahani Al-Manie
 
Python and its Applications
Python and its ApplicationsPython and its Applications
Python and its ApplicationsAbhijeet Singh
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming KrishnaMildain
 
Network programming Using Python
Network programming Using PythonNetwork programming Using Python
Network programming Using PythonKarim Sonbol
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Edureka!
 
Data visualization in Python
Data visualization in PythonData visualization in Python
Data visualization in PythonMarc Garcia
 
What is Tuple in python? | Python Tuple Tutorial | Edureka
What is Tuple in python? | Python Tuple Tutorial | EdurekaWhat is Tuple in python? | Python Tuple Tutorial | Edureka
What is Tuple in python? | Python Tuple Tutorial | EdurekaEdureka!
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-pythonAakashdata
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An IntroductionSwarit Wadhe
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonPro Guide
 

What's hot (20)

Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)
 
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaPython Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
 
Python basics
Python basicsPython basics
Python basics
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
 
Python GUI
Python GUIPython GUI
Python GUI
 
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
 
Python and its Applications
Python and its ApplicationsPython and its Applications
Python and its Applications
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 
Network programming Using Python
Network programming Using PythonNetwork programming Using Python
Network programming Using Python
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
 
Python ppt
Python pptPython ppt
Python ppt
 
Python Basics
Python BasicsPython Basics
Python Basics
 
Data visualization in Python
Data visualization in PythonData visualization in Python
Data visualization in Python
 
What is Tuple in python? | Python Tuple Tutorial | Edureka
What is Tuple in python? | Python Tuple Tutorial | EdurekaWhat is Tuple in python? | Python Tuple Tutorial | Edureka
What is Tuple in python? | Python Tuple Tutorial | Edureka
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
 
Python final ppt
Python final pptPython final ppt
Python final ppt
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
Python
PythonPython
Python
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of Python
 

Viewers also liked

Python Tricks That You Can't Live Without
Python Tricks That You Can't Live WithoutPython Tricks That You Can't Live Without
Python Tricks That You Can't Live WithoutAudrey Roy
 
Advance OOP concepts in Python
Advance OOP concepts in PythonAdvance OOP concepts in Python
Advance OOP concepts in PythonSujith Kumar
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python amiable_indian
 
Python的50道陰影
Python的50道陰影Python的50道陰影
Python的50道陰影Tim (文昌)
 
連淡水阿嬤都聽得懂的 機器學習入門 scikit-learn
連淡水阿嬤都聽得懂的機器學習入門 scikit-learn 連淡水阿嬤都聽得懂的機器學習入門 scikit-learn
連淡水阿嬤都聽得懂的 機器學習入門 scikit-learn Cicilia Lee
 
型態與運算子
型態與運算子型態與運算子
型態與運算子Justin Lin
 
常用內建模組
常用內建模組常用內建模組
常用內建模組Justin Lin
 
Python 起步走
Python 起步走Python 起步走
Python 起步走Justin Lin
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesMatt Harrison
 
[系列活動] Python 程式語言起步走
[系列活動] Python 程式語言起步走[系列活動] Python 程式語言起步走
[系列活動] Python 程式語言起步走台灣資料科學年會
 
[系列活動] 無所不在的自然語言處理—基礎概念、技術與工具介紹
[系列活動] 無所不在的自然語言處理—基礎概念、技術與工具介紹[系列活動] 無所不在的自然語言處理—基礎概念、技術與工具介紹
[系列活動] 無所不在的自然語言處理—基礎概念、技術與工具介紹台灣資料科學年會
 

Viewers also liked (14)

Python 2-基本語法
Python 2-基本語法Python 2-基本語法
Python 2-基本語法
 
Python Tricks That You Can't Live Without
Python Tricks That You Can't Live WithoutPython Tricks That You Can't Live Without
Python Tricks That You Can't Live Without
 
Advance OOP concepts in Python
Advance OOP concepts in PythonAdvance OOP concepts in Python
Advance OOP concepts in Python
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
 
Python的50道陰影
Python的50道陰影Python的50道陰影
Python的50道陰影
 
連淡水阿嬤都聽得懂的 機器學習入門 scikit-learn
連淡水阿嬤都聽得懂的機器學習入門 scikit-learn 連淡水阿嬤都聽得懂的機器學習入門 scikit-learn
連淡水阿嬤都聽得懂的 機器學習入門 scikit-learn
 
型態與運算子
型態與運算子型態與運算子
型態與運算子
 
進階主題
進階主題進階主題
進階主題
 
常用內建模組
常用內建模組常用內建模組
常用內建模組
 
Python 起步走
Python 起步走Python 起步走
Python 起步走
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 Minutes
 
[系列活動] Python 程式語言起步走
[系列活動] Python 程式語言起步走[系列活動] Python 程式語言起步走
[系列活動] Python 程式語言起步走
 
[系列活動] Python爬蟲實戰
[系列活動] Python爬蟲實戰[系列活動] Python爬蟲實戰
[系列活動] Python爬蟲實戰
 
[系列活動] 無所不在的自然語言處理—基礎概念、技術與工具介紹
[系列活動] 無所不在的自然語言處理—基礎概念、技術與工具介紹[系列活動] 無所不在的自然語言處理—基礎概念、技術與工具介紹
[系列活動] 無所不在的自然語言處理—基礎概念、技術與工具介紹
 

Similar to Python 2 vs. Python 3

Class 1: Welcome to programming
Class 1: Welcome to programmingClass 1: Welcome to programming
Class 1: Welcome to programmingMarc Gouw
 
EuroPython 2015 - Decorators demystified
EuroPython 2015 - Decorators demystifiedEuroPython 2015 - Decorators demystified
EuroPython 2015 - Decorators demystifiedPablo Enfedaque
 
OpenGurukul : Language : Python
OpenGurukul : Language : PythonOpenGurukul : Language : Python
OpenGurukul : Language : PythonOpen Gurukul
 
Pycon2017 instagram keynote
Pycon2017 instagram keynotePycon2017 instagram keynote
Pycon2017 instagram keynoteLisa Guo
 
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016Easy contributable internationalization process with Sphinx @ PyCon APAC 2016
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016Takayuki Shimizukawa
 
Jupyter Kernel: How to Speak in Another Language
Jupyter Kernel: How to Speak in Another LanguageJupyter Kernel: How to Speak in Another Language
Jupyter Kernel: How to Speak in Another LanguageWey-Han Liaw
 
Execution model and other must-know's
Execution model and other must-know'sExecution model and other must-know's
Execution model and other must-know'sPablo Enfedaque
 
Susanna frazier 1 pager sourcing on git hub
Susanna frazier 1 pager   sourcing on git hubSusanna frazier 1 pager   sourcing on git hub
Susanna frazier 1 pager sourcing on git hubTalent42
 

Similar to Python 2 vs. Python 3 (9)

Decorators demystified
Decorators demystifiedDecorators demystified
Decorators demystified
 
Class 1: Welcome to programming
Class 1: Welcome to programmingClass 1: Welcome to programming
Class 1: Welcome to programming
 
EuroPython 2015 - Decorators demystified
EuroPython 2015 - Decorators demystifiedEuroPython 2015 - Decorators demystified
EuroPython 2015 - Decorators demystified
 
OpenGurukul : Language : Python
OpenGurukul : Language : PythonOpenGurukul : Language : Python
OpenGurukul : Language : Python
 
Pycon2017 instagram keynote
Pycon2017 instagram keynotePycon2017 instagram keynote
Pycon2017 instagram keynote
 
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016Easy contributable internationalization process with Sphinx @ PyCon APAC 2016
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016
 
Jupyter Kernel: How to Speak in Another Language
Jupyter Kernel: How to Speak in Another LanguageJupyter Kernel: How to Speak in Another Language
Jupyter Kernel: How to Speak in Another Language
 
Execution model and other must-know's
Execution model and other must-know'sExecution model and other must-know's
Execution model and other must-know's
 
Susanna frazier 1 pager sourcing on git hub
Susanna frazier 1 pager   sourcing on git hubSusanna frazier 1 pager   sourcing on git hub
Susanna frazier 1 pager sourcing on git hub
 

Recently uploaded

Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsPaul Groth
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 

Recently uploaded (20)

Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 

Python 2 vs. Python 3

  • 1. { Python  2  vs.  Python  3 “event”:      “Python  BCN  Meetup  –  Beginners  session” “author”:  “Pablo  Enfedaque” “twi6er”:  “@pablitoev56”
  • 2. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} >  December  1989:  Guido  Van  Rossum  starts   Python  implementation >  January  1994:  Version  1.0  released >  October  2000:  Version  2.0  released >  December  2008:  Version  3.0  released >  June  2009:  Version  3.1  released >  July  2010:  Version  2.7  released  with  backports >  2014:  current  versions  are  2.7.6  and  3.4 Python  versions
  • 3. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} >  December  1989:  Guido  Van  Rossum  starts   Python  implementation >  January  1994:  Version  1.0  released >  October  2000:  Version  2.0  released >  December  2008:  Version  3.0  released >  June  2009:  Version  3.1  released >  July  2010:  Version  2.7  released  with  backports >  2014:  current  versions  are  2.7.6  and  3.4 WTF?!
  • 4. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Python  3  is backwards  incompatible
  • 5. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} >  Backwards  incompatibilities >  print  and  exec  become  functions >  All  classes  are  new-­‐‑style >  Massive  usage  of  generators  instead  of  lists >  All  text  (str)  is  Unicode  and  encoded  text  is   binary  data  (bytes) >  Other  minor  changes  in  std  lib Python  3.0
  • 6. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Why  Python  3?
  • 7. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Mainly  because  of  encodings Why  Python  3?
  • 8. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Google:  Python  encoding  sucks
  • 9. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Google:  Python  3  sucks
  • 10. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Really  because  of  encodings?? Why  Python  3?
  • 11. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Why  should  I  move  to  Python  3?
  • 12. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} >  Proper  encoding >  asyncio >  enums >  Standard  library  virtualenvs >  Exception  chaining >  Single-­‐‑dispatch >  uni6est.mock >  contextlib >  “Be6er”  GIL >  concurrent.futures >  selectors  module >  Qualified  names >  … Python  3.4  new  features  (vs.  2.7)
  • 13. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Why  people  don’t  use  Python  3?
  • 14. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Why  people  don’t  use  Python  3? No  dependencies  ported
  • 15. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Why  people  don’t  use  Python  3? Laziness?
  • 16. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} >  Great  features  are  waiting  us  in  Python  3 >  We  are  beyond  half  the  planned  life  of  Python  2.7 >  Python  2.6  is  officially  retired  with  2.6.9  release >  Most  3rd  party  dependencies  already  in  Python  3 >  Or  we  could  return  to  OSS  all  that  we  have  been  given >  hZps://caniusepython3.com >  Porting  to  Python  3  is  not  such  a  big  deal >  In  most  of  the  cases >  So,  no  more  excuses >  It’s  time  to  start  moving  to  Python  3 Conclusions
  • 17. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Conclusions
  • 18. {  “event”:  “Python  BCN  Meetup”,  “author”:  “Pablo  Enfedaque”,  “twi6er”:  “@pablitoev56”} Q&A Thanks  for  coming! Slides:   h6ps://speakerdeck.com/pablito56/ python-­‐‑2-­‐‑vs-­‐‑python-­‐‑3