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 (20)

PDF
Sızma Testi ve Güvenlik Uygulamaları El Kitabı - Furkan Enes Polatoğlu
Furkan Enes Polatoglu
 
PPTX
Bsides 2019 - Intelligent Threat Hunting
Dhruv Majumdar
 
PPTX
for loop in java
Majid Ali
 
PPTX
OOP interview questions & answers.
Questpond
 
PPT
Darknet
tchou21
 
PDF
Open Source Intelligence (OSINT)
festival ICT 2016
 
PPTX
Detection Rules Coverage
Sunny Neo
 
PPTX
Dynamic method dispatch
yugandhar vadlamudi
 
PPT
Wireshark Basics
Yoram Orzach
 
PPTX
Sqlmap
shamshad9
 
PPTX
Jhon the ripper
Merve Karabudağ
 
PPTX
Recon with Nmap
OWASP Delhi
 
PPTX
Session hijacking
Gayatri Kapse
 
DOCX
GÜVENLİK SİSTEMLERİNİ ATLATMA
BGA Cyber Security
 
PPTX
Sqlmap
Rushikesh Kulkarni
 
PDF
Suricata
tex_morgan
 
PPT
Firewall(linux)
Santosh Khadsare
 
PDF
Introduction to Web Application Penetration Testing
Netsparker
 
PDF
Nikto
Sorina Chirilă
 
PDF
Upping the APT hunting game: learn the best YARA practices from Kaspersky
Kaspersky
 
Sızma Testi ve Güvenlik Uygulamaları El Kitabı - Furkan Enes Polatoğlu
Furkan Enes Polatoglu
 
Bsides 2019 - Intelligent Threat Hunting
Dhruv Majumdar
 
for loop in java
Majid Ali
 
OOP interview questions & answers.
Questpond
 
Darknet
tchou21
 
Open Source Intelligence (OSINT)
festival ICT 2016
 
Detection Rules Coverage
Sunny Neo
 
Dynamic method dispatch
yugandhar vadlamudi
 
Wireshark Basics
Yoram Orzach
 
Sqlmap
shamshad9
 
Jhon the ripper
Merve Karabudağ
 
Recon with Nmap
OWASP Delhi
 
Session hijacking
Gayatri Kapse
 
GÜVENLİK SİSTEMLERİNİ ATLATMA
BGA Cyber Security
 
Suricata
tex_morgan
 
Firewall(linux)
Santosh Khadsare
 
Introduction to Web Application Penetration Testing
Netsparker
 
Upping the APT hunting game: learn the best YARA practices from Kaspersky
Kaspersky
 

Viewers also liked (14)

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

Similar to Python 2 vs. Python 3 (20)

KEY
State of Python (2010)
Richard Jones
 
PDF
It's 2019 & I'm still using Python 2! Should I be worried?
Sebastian Witowski
 
PDF
Python lecture 01
Tanwir Zaman
 
PDF
Python - basics
Jéferson Machado
 
PDF
Austin Python Meetup 2017: How to Stop Worrying and Start a Project with Pyth...
Viach Kakovskyi
 
PPT
Python Evolution
Quintagroup
 
PDF
Porting to Python 3
Lennart Regebro
 
DOC
Python 2 vs Python 3 Key Differences.doc
TCCI Computer Coaching
 
PDF
Plone ♥︎ Python 3
Philip Bauer
 
PDF
Porting to Python 3
Lennart Regebro
 
PDF
Pycon taiwan 2018_claudiu_popa
Claudiu Popa
 
PDF
Python 2 is dead! Drag your old code into the modern age
Becky Smith
 
PPTX
Python History and Basics with practical example
arshadfarhad08
 
PDF
What's the Scoop with Python 3?
Python Ireland
 
ODP
Python 3 Intro Presentation for NEWLUG
NEWLUG
 
PPTX
Chapter - 1.pptx
MikialeTesfamariam
 
PPTX
The Onward Journey: Porting Twisted to Python 3
Craig Rodrigues
 
PPT
Os Vanrossum
oscon2007
 
PPTX
Introduction to python
ManishJha237
 
State of Python (2010)
Richard Jones
 
It's 2019 & I'm still using Python 2! Should I be worried?
Sebastian Witowski
 
Python lecture 01
Tanwir Zaman
 
Python - basics
Jéferson Machado
 
Austin Python Meetup 2017: How to Stop Worrying and Start a Project with Pyth...
Viach Kakovskyi
 
Python Evolution
Quintagroup
 
Porting to Python 3
Lennart Regebro
 
Python 2 vs Python 3 Key Differences.doc
TCCI Computer Coaching
 
Plone ♥︎ Python 3
Philip Bauer
 
Porting to Python 3
Lennart Regebro
 
Pycon taiwan 2018_claudiu_popa
Claudiu Popa
 
Python 2 is dead! Drag your old code into the modern age
Becky Smith
 
Python History and Basics with practical example
arshadfarhad08
 
What's the Scoop with Python 3?
Python Ireland
 
Python 3 Intro Presentation for NEWLUG
NEWLUG
 
Chapter - 1.pptx
MikialeTesfamariam
 
The Onward Journey: Porting Twisted to Python 3
Craig Rodrigues
 
Os Vanrossum
oscon2007
 
Introduction to python
ManishJha237
 
Ad

More from Pablo Enfedaque (8)

PDF
EuroPython 2015 - Decorators demystified
Pablo Enfedaque
 
PDF
Why I miss MongoDB
Pablo Enfedaque
 
PDF
Execution model and other must-know's
Pablo Enfedaque
 
PDF
Sprayer: low latency, reliable multichannel messaging
Pablo Enfedaque
 
PDF
The (unknown) collections module
Pablo Enfedaque
 
PDF
Decorators demystified
Pablo Enfedaque
 
PDF
Python: the coolest is yet to come
Pablo Enfedaque
 
PDF
From Oracle to MongoDB
Pablo Enfedaque
 
EuroPython 2015 - Decorators demystified
Pablo Enfedaque
 
Why I miss MongoDB
Pablo Enfedaque
 
Execution model and other must-know's
Pablo Enfedaque
 
Sprayer: low latency, reliable multichannel messaging
Pablo Enfedaque
 
The (unknown) collections module
Pablo Enfedaque
 
Decorators demystified
Pablo Enfedaque
 
Python: the coolest is yet to come
Pablo Enfedaque
 
From Oracle to MongoDB
Pablo Enfedaque
 

Recently uploaded (20)

PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 

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