What's the Scoop with Python 3?

  • View
    544

  • Download
    2

Embed Size (px)

DESCRIPTION

At PyCon Ireland 2010, Paul described his experience of working with Python 3 in creating O'Reilly's Head First Programming and Head First Python (both of which target Python 3). As a big fan of Python 3, Paul suggested that all Python 2 programmers needed to at least try Python 3 as soon as was practical, if not embrace it for all "new" work. In this talk, Paul provides an update on the current status of Python 3 and discusses the community's adoption (or lack of) the latest version of the Python programming language, talking about what has changed in the year and a bit since last year, as well as describing his own experience of working with Python on recent consultancy projects.

Text of What's the Scoop with Python 3?

  • 1. Whats the scoop with Python 3?Paul Barry Institute of Technology, Carlow in Ireland PyCon Ireland 20111

2. Grab the slides:http://paulbarry.itcarlow.ie/Python3.pdf 3. Start working with Python 3 now! 3 4. It seems nobody was listening... 4 5. So... whats the scoop?5 6. Despite going from strength-to-strength, Python 3 has yet to replace Python 2 6 7. WTF? 7 8. Despite being nearly 3 years old,Python 3 has yet to replace Python 2 8 9. Thats OK9 10. In the short-to-medium term,Python 3 wasnt meant to replace Python 210 11. Not yet, anyway... 11 12. I wonder are the coffee refills free today?12 13. Which version ofPython should I usetoday? 13 14. Not an either-or decision14 15. What do the good folk at python.org have to say? 15 16. Point #1 - Use 2 instead of 3... if youre deploying to an environment you dontcontrol, that may impose a specific version ratherthan allowing you a free selection from theavailable versions. 16 17. I recently worked on a project that unashamedlyspecified Python 2.6.4 as the target platform (even though the work was XML-based)17 18. Point #2 - Use 2 instead of 3... if you want to use a specific third partypackage or utility that doesnt yet have a releasedversion that is compatible with Python 3, and porting that package is a non-trivial task...18 19. Another project (wisely) selected Django asthe target web-dev platform... which meant morework for me in Python 2.x19 20. Point #3 - Use 2 instead of 3 ... if you wish to use an alternativeimplementation of Python such as IronPython, Jython or PyPy... 20 21. A third project specified the .NET platform, but didnt care which language I used... 21 22. A third project specified the .NET platform, but didnt care which language I used...I used IronPython and was restrictedto working with the 2.7 release of Python 22 23. Its hard to get away fromPython 2... 23 24. Its hard to get away from Python 2... especially when Python 2.7 isnt half-bad24 25. So, like, dude...whats the problem?25 26. Eventually, 2.x wont cut it anymore...26 27. Python 2.x isDEAD27 28. It will soon start to smell28 29. This talksBIGMESSAGE29 30. Your current 2.x codebase is nowLEGACY 30 31. 31 32. 32 33. 33 34. How can you say such a thing?34 35. At some point, youll have to port allof your current 2.x code to Python 335 36. Python 3 will soon becomeTHE DEFAULT36 37. This Is Your Future: 37 38. Imagine if this was to happen with some other distribution or OS...?!?38 39. Prevailing attitudes towards Python 339 40. Ill just ignoreit and itllgo away. 40 41. Ignore the future at yourPERIL41 42. Whatever were they thinking? Sure, the print statementdoesnt even work!!! 42 43. The print statement in 2.x isBROKEN43 44. Theres no goodPython 3 specificbooks out there.44 45. 45 46. 46 47. This is all rubbish! Well just keep writing 2.x codeFOREVER...47 48. You are inDENIAL48 49. Be honest... theresnot one single featurethat demands the upgrade, right? 49 50. UNICODE50 51. 51 52. Look we cantdo anything until thoseguys over there update their code...52 53. Look we cantdo anything until thoseguys over there update their code...I agree - lets do nothing.53 54. If you doNOTHINGyou are in DENIAL 54 55. 55 56. 56 57. 57 58. 58 59. Im back where I started 59 60. Start working with Python 3 now! 60 61. Start your Python 3porting effort now!61 62. Your love lifedepends on it!!! 62 63. I really do love you...63 64. Thats nice. But, Idlove you more if onlyyoud port your codeto Python 3. 64 65. Final question to those of you that think you can survive with Python 2.x 65 66. How many of you are still supporting Python 1.x code? 66 67. Questions? 67