What's the scoop with Python 3?




  Paul Barry – Institute of Technology, Carlow in Ireland


                   PyCon Ireland 2011
                                                            1
Grab the slides:

http://paulbarry.itcarlow.ie/Python3.pdf
Start working with
 Python 3 now!




                     3
It seems nobody was listening...




                                   4
So... what's the scoop?



                          5
Despite going from strength-to-strength,
 Python 3 has yet to replace Python 2




                                           6
WTF?

       7
Despite being nearly 3 years old,
Python 3 has yet to replace Python 2




                                       8
That's OK

            9
In the short-to-medium term,
Python 3 wasn't meant to replace Python 2




                                            10
Not yet, anyway...




                     11
I wonder are the
   coffee refills
   free today?




                    12
Which version of
    Python
 should I use
    today?




                   13
Not an either-or decision



                            14
What do the good folk at python.org have to say?




                                               15
Point #1 - Use 2 instead of 3



“... if you're deploying to an environment you don't
control, that may impose a specific version rather
      than allowing you a free selection from the
                  available versions.”



                                                   16
I recently worked on a project that unashamedly
  specified Python 2.6.4 as the target platform

   (even though the work was XML-based)




                                                  17
Point #2 - Use 2 instead of 3



    “... if you want to use a specific third party
package or utility that doesn't yet have a released
  version that is compatible with Python 3, and
   porting that package is a non-trivial task...”



                                                  18
Another project (wisely) selected Django as
the target web-dev platform... which meant more
            work for me in Python 2.x




                                                  19
Point #3 - Use 2 instead of 3




     “... if you wish to use an alternative
implementation of Python such as IronPython,
               Jython or PyPy...”




                                               20
A third project specified the .NET platform,
 but didn't care which language I used...




                                               21
A third project specified the .NET platform,
 but didn't care which language I used...

  I used IronPython and was restricted
to working with the 2.7 release of Python




                                               22
It's hard to get away from
        Python 2...




                             23
It's hard to get away from
                 Python 2...

… especially when Python 2.7 isn't half-bad




                                              24
So, like, dude...
what's the problem?




                      25
Eventually, 2.x won't cut it anymore...




                                          26
Python 2.x is

DEAD

                27
It will soon start to smell




                              28
This talk's



  BIG
MESSAGE
                29
Your current 2.x codebase is now



  LEGACY

                                   30
31
32
33
How can you say
 such a thing?




                  34
At some point, you'll have to port all
of your “current” 2.x code to Python 3




                                          35
Python 3 will soon become

THE DEFAULT

                              36
This Is Your Future:




                       37
Imagine if this was to happen with some
     other distribution or OS...?!?




                                          38
Prevailing attitudes towards Python 3




                                        39
I'll just ignore
    it and it'll
    go away.




                   40
Ignore the future at your

  PERIL

                            41
Whatever were they thinking?
 Sure, the print statement
    doesn't even work!!!




                               42
The print statement in 2.x is


BROKEN

                                43
There's no good
Python 3 specific
books out there.




                    44
45
46
This is all rubbish!   We'll just keep
                       writing 2.x code
                        FOREVER...




                                          47
You are in

DENIAL

              48
Be honest... there's
not one single feature
  that demands the
   upgrade, right?




                         49
UNICODE

          50
51
Look – we can't
do anything until those
guys over there update
     their code...




                          52
Look – we can't
do anything until those
guys over there update
     their code...        I agree - let's
                           do nothing.




                                            53
If you do

NOTHING
  you are in

 DENIAL
               54
55
56
57
58
I'm back where I started



                           59
Start working with
 Python 3 now!




                     60
Start your Python 3
porting effort now!



                      61
Your love life
depends on it!!!



                   62
I really do love you...




                          63
That's nice. But, I'd
love you more if only
you'd port your code
    to Python 3.




                         64
Final question to those of you
 that think you can “survive”
       with Python 2.x




                                 65
How many of you are still supporting
       Python 1.x code?




                                       66
Questions?




             67

What's the Scoop with Python 3?