Re: Why has python3 been created as a seperate language where thereis still python2.7 ?

Discussion in 'Python' started by Andrew Berg, Jun 25, 2012.

  1. Andrew Berg

    Andrew Berg Guest

    On 6/23/2012 10:46 PM, gmspro wrote:
    > What's wrong editing/customizing/changin python2.7 instead of making a
    > seperate language?

    py3k is not a separate language. In fact, it is possible to maintain a
    codebase that supports 2.2 (maybe even older), 3.3, and every version in
    between.

    > What's wrong working with python2.7?

    A lot. Off the top of my head:
    In 2.7, the print statement has arbitrary and unobvious syntax. The
    print() function has arguments.
    In 2.7, input() evaluates incoming strings, which is almost always not
    appropriate and can lead to exploits. In py3k, input() doesn't do this.
    It returns exactly what it receives.

    I barely work with 2.x at all; others will be able to list many more in
    much more detail.

    > As python3 is not backward compatible, so many packages built on
    > python2.7 will be gone someday. Or you have to re-write/upgrade to
    > python3. That's a tedious/labourious task.

    Indeed. Backward compatibility is important, but it should not be king.
    Python had (and arguably still has) major issues that could only be
    fixed by breaking backward compatibility.
    AFAIK, people use 2.x mainly because they depend on libraries that are
    not compatible with py3k yet (e.g., Twisted) or because their preferred
    implementation does not implement 3.x (e.g., Jython, PyPy).

    > So after 5 years will we get another python4 as seperate language?

    No, but there may be changes that aren't backward compatible.

    --
    CPython 3.3.0a4 | Windows NT 6.1.7601.17803
     
    Andrew Berg, Jun 25, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,258
    Smokey Grindel
    Dec 2, 2006
  2. Terry
    Replies:
    20
    Views:
    817
    Дамјан ГеоргиевÑки
    Feb 8, 2009
  3. Stefan Behnel
    Replies:
    3
    Views:
    341
    HoneyMonster
    Jun 26, 2012
  4. Michiel Overtoom
    Replies:
    28
    Views:
    594
    Chris Angelico
    Jun 28, 2012
  5. fl
    Replies:
    5
    Views:
    309
    Rui Maciel
    Jan 6, 2013
Loading...

Share This Page