Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #24423 > unrolled thread

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

Started byAndrew Berg <bahamutzero8825@gmail.com>
First post2012-06-25 03:48 -0500
Last post2012-06-25 03:48 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Why has python3 been created as a seperate language where there is still python2.7 ? Andrew Berg <bahamutzero8825@gmail.com> - 2012-06-25 03:48 -0500

#24423 — Re: Why has python3 been created as a seperate language where there is still python2.7 ?

FromAndrew Berg <bahamutzero8825@gmail.com>
Date2012-06-25 03:48 -0500
SubjectRe: Why has python3 been created as a seperate language where there is still python2.7 ?
Message-ID<mailman.1483.1340614104.4697.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web