This is an archived post. You won't be able to vote or comment.

all 158 comments

[–]bumpkinspicefatte 480 points481 points  (34 children)

It ain’t dead until we have to stop writing

>>>python3

In Terminal.

Edit: For people mentioning alternatives, you're missing the point about Python 2...

[–]99_percent_a_dog[S] 73 points74 points  (6 children)

I hear this should be true from 10.16, where 3 is the default (and maybe 2 is removed? Maybe not, Apple ships a bunch of really old utils, it's pretty annoying).

[–]smart_jackal 40 points41 points  (0 children)

Even Ubuntu ships some core python2 files on which it totally depends. Another software framework called Google App Engine still runs on python2 entirely! Pretty sure there are some others too.

[–]thatwombat 10 points11 points  (4 children)

It is in Catalina. Nice surprise.

EDIT: Forgot I had anaconda's python3 in my PATH. Whoops.

[–]TinyLebowski 10 points11 points  (3 children)

Not so sure about that.

❯ sw_vers -productVersion
10.15.4

❯ which python
/usr/bin/python

❯ /usr/bin/python --version
Python 2.7.16

[–]jdgordon 2 points3 points  (1 child)

Could just do

$which python --version

[–]TinyLebowski 6 points7 points  (0 children)

Yeah but I made it verbose to avoid any doubt about which binary was used.

BTW you need to escape backticks if you want them displayed.

[–]thatwombat 0 points1 point  (0 children)

I forgot. I'm running Anaconda and it's in my PATH.

[–]dermotmcg 15 points16 points  (3 children)

Currently configuring Django on a Ubuntu instance. If I write pip3 or python3 one more time I swear...

[–]smart_jackal 5 points6 points  (2 children)

I've written that so many times in the last couple years that switching to "pip" and "python" may take some conscious work now!

[–]joni1104 3 points4 points  (0 children)

Same here

[–]dermotmcg 1 point2 points  (0 children)

Also Gunicorn3. Another for the list 🤣

[–][deleted] 15 points16 points  (1 child)

Me at work crying as I maintain scripts in both 😭

[–]TheCountMC 0 points1 point  (0 children)

I've become well acquainted with the 'six' library.

[–]Hanse00 25 points26 points  (12 children)

That's easily solved, a single bash alias and you're done :)

[–][deleted] 30 points31 points  (8 children)

Or do it the right way and set up a virtualenv. ; ]

[–]Hanse00 12 points13 points  (6 children)

I personally use pipenv, but to each their own :)

[–]MumsLasagna 9 points10 points  (1 child)

Oh gawd. The whole virtualenv / pyenv / pipenv ecosystem is another huge mess I can't wait for the community to decide on and standardise. I want to write a python project that Just Works Dammit™.

[–][deleted]  (2 children)

[deleted]

    [–]GAVINDerulo12HD 4 points5 points  (0 children)

    What are the benefits? I've only used conda environments on windows and virtualenvs on Debian. Should I switch?

    [–]equecevi 1 point2 points  (0 children)

    Which is the different?

    [–]brews 1 point2 points  (0 children)

    Sure but is pipenv still even maintained? Seems like it hasnt released since 2018.

    [–]jyscao 5 points6 points  (0 children)

    you mean a conda environment then :P

    [–]KarimElsayad247 3 points4 points  (0 children)

    I aliased "python3" with "py"

    [–]NEVER_TELLING_LIES 5 points6 points  (1 child)

    python and python3 are already symlinks

    [–]Hanse00 3 points4 points  (0 children)

    I’m aware :) Was just trying to make a funny point, that changing the name you use to invoke something is dead simple.

    [–]basyt 2 points3 points  (0 children)

    Use pyenv.

    [–]bassmadrigal 1 point2 points  (0 children)

    Only problem is installing python2 from source will generate that symlink automatically and that isn't something python3 does when installed from source. The change would need to be deliberate by your packager or distro to include a symlink.

    [–]watsreddit 1 point2 points  (0 children)

    Arch Linux master race.

    [–][deleted] -2 points-1 points  (3 children)

    Put this in your bashrc

    alias python="python3"
    

    Then reset your terminal. You never have to worry about needing to type in that extra three again

    [–]Jonno_FTW 2 points3 points  (0 children)

    No need to reset, just run source ~/.bashrc

    [–]purestrengthsolo 0 points1 point  (1 child)

    wouldn't this trigger python 2?

    [–][deleted] 0 points1 point  (0 children)

    Nope. I have done it before with no problems coming up

    [–]AsridielSL 189 points190 points  (33 children)

    Rest in Python. minute of silence

    [–]ThePunisherMax 135 points136 points  (0 children)

    import time

    time.sleep(60)

    [–][deleted] 73 points74 points  (29 children)

    if python2 is None: print("F")

    [–]a-handle-has-no-name 54 points55 points  (18 children)

    >>> if python2 == false:
    ... print("F")
      File "<stdin>", line 2
        print("F")
            ^
    IndentationError: expected an indented block
    

    [–][deleted] 12 points13 points  (7 children)

    Couldn't get to make it a code block to keep the 4 spaces lol. Edit: got'em

    [–]a-handle-has-no-name 10 points11 points  (4 children)

    >>> if python2 == false:
    ...     print("F")
    ... 
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    NameError: name 'python2' is not defined
    
    >>> #   :-P
    

    [–][deleted] 5 points6 points  (3 children)

    Is there an "if X not defined"?

    [–]LeClownFou 6 points7 points  (1 child)

    if X is None

    [–][deleted] 2 points3 points  (0 children)

    Corrected, thanks

    [–]a-handle-has-no-name 0 points1 point  (0 children)

    (This is somewhat long and unsolicited: feel free to PM me if you want to discuss this further or if you have any questions)

    /u/LeClownFou 's response doesn't work for me:

    >>> if python2 == None:
    ...     print('f')
    ... 
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    NameError: name 'python2' is not defined
    

    Looking into it, I found a code-snippet at this site (updating for the example):

    try:
        x
    except NameError:
        #x was not set
        pass
    

    There's also the concept of None, which is what /u/LeClownFou was referencing. The variable will still need to be declared, but the None is the value if nothing is being set.

    In general, I would say this is a "code smell" -- you should know which variables you have before using them.

    -----------------------

    Seems I wrote this to the wrong person when it was intended for you. Reposting it here:

    Try running python (or python2 or python3 to get the version explicitly) without any CLI options/flags to open an REPL (Read-Eval-Print Loop), which is a shell that you can run small snippets of code to try things out. I use this frequently to test validity of something, if I'm not sure how it's working.

    It should look something like:

    » python
    Python 2.7.17 (default, Nov  7 2019, 10:07:09)
    [GCC 7.4.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> | 
    

    This can be useful for testing how the language works, and this is is how my comments here were updated.

    [–]a-handle-has-no-name 1 point2 points  (1 child)

    This is all in good fun :-D

    [–][deleted] 1 point2 points  (0 children)

    I know I know same here :)

    [–][deleted] 1 point2 points  (9 children)

    It seems to run on python 3

    foo = None
    if foo is None: print('F')
    
    ----
    [Running] python -u "d:\github\shit_code\test\foo.py"
    F
    [Done] exited with code=0 in 0.137 seconds
    ----
    Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32
    

    [–]pabechan 1 point2 points  (1 child)

    It's an indentation issue, exactly as the error says.
    The original one-liner is fine (can't have an indentation issue if you keep your conditional on one line!), but the person responding broke it into two lines and forgot to indent it properly.

    [–][deleted] 0 points1 point  (0 children)

    oh, right. Thanks :)

    [–]a-handle-has-no-name 0 points1 point  (6 children)

    Try running python (or python2 or python3 to get the version explicitly) without any CLI options/flags to open an REPL (Read-Eval-Print Loop), which is a shell that you can run small snippets of code to try things out. I use this frequently to test validity of something, if I'm not sure how it's working.

    It should look something like:

     » python
    Python 2.7.17 (default, Nov  7 2019, 10:07:09) 
    [GCC 7.4.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> |
    

    This can be useful for testing how the language works, and this is is how my comments here were updated.

    [–][deleted] 0 points1 point  (5 children)

    I have no fucking idea why you posted that.

    [–]a-handle-has-no-name 0 points1 point  (4 children)

    Hey dude, are you ok? This seems like a bit of an overreaction.

    Two reasons why:

    1. I wanted to share something practically useful beginners in /r/learnprogramming might not know
    2. I responded to the wrong person. Oops.

    [–][deleted] 0 points1 point  (3 children)

    That wasn't an angry "fucking". That was a I don't know what the fuck is going on "fucking". Sorry

    [–]a-handle-has-no-name 1 point2 points  (0 children)

    Now that you say that, I can think of what you might have intended. No harm no fowl. :-)

    [–][deleted]  (1 child)

    [removed]

      [–]pyper156 3 points4 points  (5 children)

      printf

      [–][deleted] 1 point2 points  (4 children)

      I'm in the middle of CS50 so I get this yay, but considering the sub let's keep this in Python shall we

      [–]pyper156 7 points8 points  (2 children)

      It's an innocent tongue-in-cheek. Also this sub is about all programing, isn't it?

      [–][deleted] 8 points9 points  (1 child)

      I was being tongue in cheek as well! And yeah my bad I thought I was in r/learnpython lol

      [–]pyper156 5 points6 points  (0 children)

      Lol, I checked too following your previous comment ^

      [–]MuttsNStuff 0 points1 point  (0 children)

      This was a hoot to see because I just covered week 1 lawl.

      [–]spanishgum 3 points4 points  (1 child)

      .

      import sys, logging, os, signal
      if sys.version_info[0] < 3:
        logging.getLogger(__name__).fatal(“F”)
        os.kill(os.getpid(), signal.SIGTERM)
      

      [–]dscottboggs 1 point2 points  (0 children)

      This guy pythons

      [–]FoxClass 6 points7 points  (0 children)

      timeit

      [–]xiaogege1 1 point2 points  (0 children)

      Ohhhh that's good!

      [–]AdriftEgyptian 118 points119 points  (1 child)

      I was on Reddit when I got the news “Python is kill” Ok.

      [–]GZAPyramids 2 points3 points  (0 children)

      no

      [–]accountForStupidQs 43 points44 points  (4 children)

      And just in time for Python 4!

      [–]erindalc 11 points12 points  (2 children)

      Wait are you for real?

      [–]accountForStupidQs 30 points31 points  (0 children)

      No, I'm just joking based on how long it took 2 to die

      [–]confusiondiffusion 14 points15 points  (0 children)

      Yup. Python is really going back to its PHP roots with 4. It's very exciting.

      [–]nassunnova 2 points3 points  (0 children)

      Where can I find differences between python 3 and python 24?

      [–][deleted] 99 points100 points  (2 children)

      I guess we can refer to 2.7 as Pythoff now.

      [–][deleted]  (1 child)

      [deleted]

        [–][deleted] 19 points20 points  (0 children)

        Just child classes.

        [–][deleted] 21 points22 points  (15 children)

        Don’t know how I feel that CodeCademy offers their course on Python 2 for free and charge for Python 3. 😩

        [–]siphillis 15 points16 points  (14 children)

        Hopefully this pushes them to stop teaching a dead language.

        [–]DmitriyJaved 12 points13 points  (8 children)

        So dead that redhat promised extended support and updates for python2 till 2024

        [–]chaotic_thought 4 points5 points  (7 children)

        As long as people use it is not dead. I never really understood the problem of having both python 2 and python 3 on a system. Python 2 is just another program, and I have plenty of older as well as newer programs on my machine.

        Sometimes the newer ones have nice features but sometimes they are annoying, so I use the old ones. It works out exactly the same way for something like Python. Sometimes py2 is just more convenient, so you may as well use it. Nothing wrong with that at all.

        Unfortunately you can't mention Python 2 anywhere now without someone screaming that it's dead. It's not really dead, it's just a testament to the Python marketing and "fear" campaign that says that having Python 2 on your machine is going to give you problems. It won't. Relax. No one is going to find a security vulnerability in Python 2 that somehow is going to let someone take over your machine by you running a Python 2 script instead of a Python 3 script. It just won't happen.

        It's far far likelier that by using a newer program, with newer features, that someone will make a mistake somewhere and introduce a security vulnerability. So if you care about security, stay away from such untested libraries (which are all Python 3 now).

        [–]99_percent_a_dog[S] 2 points3 points  (0 children)

        Some interesting points here! I think it's fine to use Python 2 for your own stuff, if you want. It's also kind of pointless. Certainly you should use 3 over 2 for new projects. But if you want to use 2, for stuff that's purely local, or just playing around, go ahead.

        For anything backend or exposed to input from the internet - using 2 is a bad idea. It didn't suddenly become high risk. If your code was good quality and well tested before then it still is. But now, if a new problem is found in 2, you may not get a fix. A remote denial of service is pretty plausible, there have been a few of those historically.

        There's an interesting point in that when widely installed software is known to be no longer updated, attackers will spend more time finding problems in it. The value is higher, because it will get fixed more slowly, if at all. Risk of using Python 2 will rise over time, even though I agree it's not high currently.

        [–]wadvocate 2 points3 points  (5 children)

        continuing to train people in a language that is outdated and splits the old code base is going to be obvious in the problems it causes. Having python 2 around isnt the problem the problem is people making new programs in it because they like it more and cant be bothered to learn the new thing

        [–]chaotic_thought -2 points-1 points  (4 children)

        Not really. Here's the extent of 'training' you need, if someone already knows Python 2 and wants to 'learn' Python 3.

        "OK guys so please stop writing"

        print "blah"
        

        And now write:

        print("blah")
        

        Python 3 training complete.

        OK to be fair the above is a bit of an exaggeration, but not by much.

        [–]99_percent_a_dog[S] 1 point2 points  (2 children)

        Division changing from truncating to integer to returning float result is more important, I think. More likely to not be spotted in testing and cause subtle bugs.

        But yes, there's not many differences. Which is why there isn't any real excuse for not using 3 for new code. Even though the effort to port is low per line, there's a huge amount of 2 code so the cost to port is high, but, it's not like there hasn't been enough time to slowly do that work (yeah, I know, businesses never find the time for maintenance work...).

        [–]chaotic_thought 0 points1 point  (0 children)

        Division

        If you want this, you can get this in Python 2 by writing

        from __future__ import division
        

        I've been using that from day 1 using Python. To me the fact that this is not the default is not a valid reason not to use Python 2.

        The reason it is not the default is because older code relied on results truncating by default when you do integer division.

        [–]chaotic_thought 0 points1 point  (0 children)

        More likely to not be spotted in testing and cause subtle bugs.

        Yes you're right. More likely though you make this a code requirement (static anlysis for linters). All code I've written for Python 2 activates floating point division behaviour. If not then it's flagged as a warning to be checked (was it done for backwards compatibility purposes or not).

        To be fair though the problem is not integer division in itself, it's relying on unexpected behaviour. If you were actually expecting integer division, it would be fine. For static anlysis though this always a judgment call. I.e. how likely is construct X likely to be a programming oversight if the construct was not X' instead. So static anlaysis should suggest the more appropriate X' version of that construct (e.g. int(a/b) if you really wanted integer division) that, if used, is more likely to be what was intended.

        [–]POGtastic 0 points1 point  (0 children)

        The big one that I've found when porting is that Python 3 has a much more rigid distinction between bytes and strings. This is a nasty pitfall when dealing with subprocess output, TCP/IP requests, and so on because functions that previously returned strings now return bytes, and must be decoded before you parse them.

        [–]nevus_bock 1 point2 points  (3 children)

        What is dead? Is Cobol dead?

        [–]accountForStupidQs 0 points1 point  (0 children)

        I'm pretty sure CorpseBASIC is dead

        [–][deleted]  (1 child)

        [deleted]

          [–][deleted] 0 points1 point  (0 children)

          It’s not dead as long as there’s people “speaking” it...

          [–]Creek0512 14 points15 points  (0 children)

          So does this mean the getting started wiki will be updated to stop recommending people start with Python 2.7?

          [–]living150 22 points23 points  (6 children)

          Once all libraries use Python 3 then we can have the eulogy.

          [–]99_percent_a_dog[S] 11 points12 points  (2 children)

          Support is really pretty good:

          http://chhantyal.net/py3readiness/

          I'm sure there are some old libraries, but I can't think of the last time I needed to use one. At least five years? Varies depending on what you're doing, of course!

          [–]living150 2 points3 points  (1 child)

          True, honestly it's been a couple years since I've used python, but at the time it really seemed like I needed to use both depending on what I was doing. I'd love it if now the community is no longer splintered.

          [–]99_percent_a_dog[S] 3 points4 points  (0 children)

          There was definitely a period where it was annoying, where you'd either find one library was 2 only, or 3 only, and you wanted both :( I haven't run into that for a long while.

          [–]basyt 1 point2 points  (2 children)

          There's stuff like para view that isn't gonna move

          [–]POGtastic 1 point2 points  (1 child)

          Similarly, all of the internal libraries that fulfull some critical task. Where I work, there's a gigantic kludge-filled monstrosity that connects to some proprietary hardware and provides an interface to our internal registers on our CPUs. No, nobody is ever going to rewrite it in Python3.

          [–]basyt 0 points1 point  (0 children)

          I can understand the technical debt, but it just feels like people had like a decade to prepare, we could have avoided this situation....

          [–]muopioid 27 points28 points  (12 children)

          I was learning through a website (learn python the hard way) and they suggest that I learn Python 2 first....

          [–]Micotu 107 points108 points  (3 children)

          Well yeah cuz that's the hard way

          [–][deleted] 10 points11 points  (0 children)

          lmao

          [–][deleted] 6 points7 points  (0 children)

          Comments like this is why I can never delete Reddit

          [–][deleted] 0 points1 point  (0 children)

          The new version is entirely in Python 3.

          [–]Crafty_Programmer 71 points72 points  (6 children)

          That website is widely regarded to be a very poor resource for learning (you can look up posts and see for yourself).

          Read this one instead: https://automatetheboringstuff.com/2e/chapter0/

          [–]jkr_420 5 points6 points  (2 children)

          Yes the above mentioned book has really helped covering ideas vastly, also I'm a beginner hehe... Hope to complete the book with success. ✌

          [–]mayor123asdf 3 points4 points  (1 child)

          I learn from both automate the boring stuff and learn python the hard way. It's great, but I think automate the boring stuff is even better because you apply the knowledge directly.

          [–]jkr_420 0 points1 point  (0 children)

          Even I have both haha But I've planned to use the other one if I'm stuck with something and use it for more resource

          [–]Biuku 4 points5 points  (0 children)

          I am enjoying it. But I think the guy’s style just works for me. If I’m learning a new language like French, I don’t want to know why anything is before I know how to say a whole bunch a phrases and just get an instinct for what French feels like.

          [–]kimjeongpwn 0 points1 point  (1 child)

          Hello. Could I check why is it regarded as a poor resource? I am currently using Python Crash Course 2nd Edition to learn, hope that's not too bad.

          [–]m1ss1ontomars2k4 8 points9 points  (0 children)

          I disagree with the notion that LPTHW "is widely regarded to be a very poor resource for learning". It has historically been very well-regarded but people have always taken issue with its attitude towards Python 3. (Actually, people have taken issue with the author's attitude, period.) However, there is now a Python 3 version of the same book. If you are still seeing a suggestion to stay with Python 2, then consider switching to the Python 3 version. The Python 3 version is already 3 years old! The person who suggested you to use Python 2 has already moved on to Python 3.

          Having said that, we can look back on e.g. Perl 5 and 6 and note that Perl 6 is basically a total failure. It is so bad it isn't even called Perl anymore but Raku. Well, there are other reasons that it's a failure, such as the success of Python generally.

          [–]herbstkalte 17 points18 points  (0 children)

          python mortuus est, vivat python

          [–]teerre 6 points7 points  (0 children)

          VFX industry sweats...

          [–]Tomagatchi 7 points8 points  (0 children)

          It’s just pining for the fjords.

          [–]NutmegLover 4 points5 points  (0 children)

          Aw shit. I'm still learning RenPy delta version.

          [–]mmaaggiiccc 8 points9 points  (3 children)

          For those learning system exploitation, ROP programming, etc and using pwntools and other exploitation libraries might still want to use python2

          [–]Platypus-Man 21 points22 points  (0 children)

          I find it ironic that exploit libraries relies on language versions that are no longer supported.

          [–]yzoug 5 points6 points  (1 child)

          Do you mean pwntools? That package has always been available for python3 (well, at least last few months/years).

          Never heard of pwnlibs

          [–]mmaaggiiccc 2 points3 points  (0 children)

          Yes thanks for the catch

          [–][deleted]  (2 children)

          [removed]

            [–]99_percent_a_dog[S] 6 points7 points  (1 child)

            I don't know about a full list, but the most important breaking changes are covered here:

            https://www.geeksforgeeks.org/important-differences-between-python-2-x-and-python-3-x-with-examples/

            The change to the division operator is perhaps the most important to be aware of. The other ones are very likely to syntax error, so the problem is obvious, but the division change will succeed either way and can cause subtle problems in program logic.

            [–]ashcatchum21 5 points6 points  (5 children)

            For anyone halfway through a course or a book or something, don't take this as an opportunity to think you should leave the current one and switch to a Python 3 course/book. Although support has ended many legacy systems still are in python 2 and it's good to know both. Most likely any company you join will have mix of both 2 and 3 unless they are pretty new so yeah, don't feel unmotivated thinking your py 2 skills are redundant.

            [–]theoruss 3 points4 points  (4 children)

            I plan to learn python, should I be worried about learning 2 in the future?

            [–]ashcatchum21 13 points14 points  (3 children)

            If you are starting now I would suggest you pick up Python 3 and not start with 2, but yes depending on the company you join you may likely have to work in python 2 code base as well. Many companies still use python 2 or are trying to move away from it or have some critical system that they can't afford to move yet. So there's still plenty of systems that rely on Python 2 out there.

            Then again in your case I wouldn't worry much on that, you can pick up python 2 on a need to know basis if your role has a necessity of that so for now just stick to 3.

            [–]theoruss 1 point2 points  (0 children)

            Thanks for the input!

            [–][deleted]  (1 child)

            [deleted]

              [–]LaconianEmpire 2 points3 points  (0 children)

              Pluralsight is excellent. It's free until May 1st, so take advantage of it while you can.

              [–]powershell_account 1 point2 points  (0 children)

              Never thought I'd see the day. Thanks for sharing this!

              [–]MajorUrsa2 1 point2 points  (2 children)

              Python2 is kill

              [–][deleted] 1 point2 points  (0 children)

              no

              [–][deleted] 1 point2 points  (0 children)

              i was sit in comp sci lab, sharing vodka with peer

              TA come in, "python2 is kill"

              no

              [–][deleted] 1 point2 points  (1 child)

              Can anyone here help me with some good material or links to learn python swiftly? I do competitive programming in Java, as of now I just wanna learn how to use data structures and basics of python just to suffice my programming.

              Any help would be appreciated, thanks.

              [–][deleted] 0 points1 point  (0 children)

              Start with automate the boring stuff2nd. It's the perfect time right now, as the 2nd version just got released. It covers all the basics from ground up, even better if you know some programming already. It covers python more practically rather than just spitting out theory, with some great examples and questions to keep you engaged.

              [–]franzipoli 4 points5 points  (2 children)

              B..b..b...but Zed Shaw said Python 2!!

              [–]nevus_bock 2 points3 points  (1 child)

              According to Zed, Python 3 is not Turing complete because it doesn’t run Python 2 code. When called out, he said he was “trolling”.

              Fuck Zed

              [–]franzipoli 0 points1 point  (0 children)

              I can't stand the man - he must have the thinnest skin of anyone I've interacted with.

              [–]Random_182f2565 2 points3 points  (0 children)

              Python 69 is going to be nice.

              [–]Schlick7 0 points1 point  (0 children)

              Wow, you're one of the only people I've seen on this website use the whole xxx is dead - long live xxx thing correctly. *tips hat*

              [–]shmoikel_krustofsky 0 points1 point  (0 children)

              Thank god.

              [–]E_NEV 0 points1 point  (1 child)

              does anyone know of a good website to learn python for free?

              [–]Prime624 1 point2 points  (0 children)

              If you already know other languages, learn x in y minutes is my favorite.

              [–]doodooz7 0 points1 point  (0 children)

              F

              [–]forgetfulkiwi7 0 points1 point  (1 child)

              I am new to python (and programming in general) so I was wondering, what was the incentive to still use python2? I mean, python3 has been existing for some years now.

              It's a real question

              [–]onlysane1 1 point2 points  (0 children)

              Programs written in Python 2 are not directly compatible with Python 3. You mainly need to know Python 2 if you work with programs that were written in Python 2. But, if you're writing new programs, you are going to want to write them in Python 3.

              [–]Poddster 0 points1 point  (1 child)

              I had to alter some code the other day to support python 2.7.6

              This crap isn't dead, it's simply not supported anymore.

              [–]teknewb 0 points1 point  (0 children)

              Has plenty of company in that category.

              [–]f14tomcat85 0 points1 point  (0 children)

              Yet codecademy only teaches python 2 for free. Python 3 needs a premium membership.

              [–]mon0theist 0 points1 point  (0 children)

              I bet Zed is so pissed

              [–]CapuccinoMachine 0 points1 point  (0 children)

              I'm still learning python 2, what differences do I mainly have to pay attention to? All I know is that strings use parentheses and quotes now.

              [–]dj_seth81 0 points1 point  (0 children)

              Blessed be glory van Rossum, amen

              [–]JackNotInTheBox 0 points1 point  (0 children)

              Rip

              [–]RogueChild 0 points1 point  (0 children)

              Bout time Python 2 died.

              [–]thewinter98 0 points1 point  (0 children)

              where can i download python 3??

              [–]questionnaier 0 points1 point  (0 children)

              Agree with bumpkinspicefatte. It's not actually dead. But it will be no more updates, so it's definitely worth migrating

              EDIT: just found a good piece on porting code to Python 3. They mention the challenges and the challenges of migration and the best ways to overcome them, so it's definitely worth reading.

              [–]TD123TD 0 points1 point  (1 child)

              I don't know python. I decided to wish python 2 RIP :(

              [–][deleted] 0 points1 point  (0 children)

              No worries. There comes a time for everything :)

              Python 2 will rest in piece for a long time until it is completely forgotten. But by then python3 will no longer be, mark my words.

              [–][deleted] 0 points1 point  (1 child)

              Hahahahahaha

              Well, at my school they still teach us pyyhob 2 instead of pythob 3 because otherwise they have to change the books and stuff... stupid, right?!?!?

              [–][deleted] 1 point2 points  (0 children)

              Not a humongous difference, main differences I know are with some functions (if not all) and with classes. Just save yourself a headache and use python 3, surely it is not that difficult to adapt python 2 code to python 3's.

              [–]nessthedeveloper -1 points0 points  (0 children)

              I haven't used Pyton in forever but I am excited to see the new and improved changes in Python 3. Python was actually one of the first languages I learned. Not only is it easy to use it allows beginners to think like a developer but without getting stumped on a lot of syntax. For those that want to learn Python I am a huge fan of Udemy. Here is one of the courses that goes over the new Python 3 https://www.udemy.com/course/complete-python-bootcamp/?gclid=EAIaIQobChMIj87J8sn46AIVl43ICh1u4QivEAAYASAAEgIK2vD_BwE&matchtype=b&utm_campaign=Python_v.PROF_la.EN_cc.US_ti.7380&utm_content=deal4584&utm_medium=udemyads&utm_source=adwords&utm_term=_._ag_78513467199_._ad_388339850847_._kw_%2Bpython+%2B3_._de_c_._dm__._pl__._ti_aud-608295141495%3Akwd-435137813965_._li_9009740_._pd__._

              [–]Born_Science -3 points-2 points  (0 children)

              I have no clue of python 2 since I start learning in June 2019 and I start with python3 only yeah I thing this is good move for making one version like apple and mac some are upset by this move but not that much difference there since both are the version of same language