I am worried about Python 3

J

jmDesktop

I am a new Python programmer. I have always desired to learn Python,
but have never had the opportunity. Recently this has changed, and I
have an opportunity to get away from the .NET framework. I found
Django (and other web frameworks) and began my quest to learn. I
started reading Dive Into Python and anything I could find and started
participating here in usenet. Then I had to read this:

http://www.comp.leeds.ac.uk/nde/papers/teachpy3.html

I think that every time I start a new technology (to me) it is about
to change. Yes, I know that is the nature of things, but I'm always
at the start of "something new."

If I continue in Python 2.5.x, am I making a mistake? Is it really
that different?

Here is an excerpt that is causing me concern:

Two new versions of the language are currently in development: version
2.6, which retains backwards compatibility with previous releases; and
version 3.0, which breaks backwards compatibility to the extent that
even that simplest of programs, the classic 'Hello, World', will no
longer work in its current form.

It makes me feel like I am wasting my time and makes it difficult to
justify spending time on projects using 2.5.x and using it where I
work.
 
M

Marc 'BlackJack' Rintsch

If I continue in Python 2.5.x, am I making a mistake? Is it really
that different?

No it's still Python and most things you've learned with 2.x stay the same.
Here is an excerpt that is causing me concern:

Two new versions of the language are currently in development: version
2.6, which retains backwards compatibility with previous releases; and
version 3.0, which breaks backwards compatibility to the extent that
even that simplest of programs, the classic 'Hello, World', will no
longer work in its current form.

Sounds a bit like FUD. While it's true that the classic greeting will
break because the ``print`` statement turned into a `print()` function,
it's not a ground shaking change that makes all knowledge about 2.x
obsolete or radically changes the look of Python programs.

Old::

print 'Hello World'

New::

print('Hello World')

There will be a `2to3.py` program coming with Python 2.6 that tries to
convert most changes automatically. You may have to change the 2.6 code
in a way that makes the automatic conversion possible but it is a
important goal for the Python developers to make the transition as smooth
as possible as far as I can tell.

Ciao,
Marc 'BlackJack' Rintsch
 
D

Diez B. Roggisch

jmDesktop said:
I am a new Python programmer. I have always desired to learn Python,
but have never had the opportunity. Recently this has changed, and I
have an opportunity to get away from the .NET framework. I found
Django (and other web frameworks) and began my quest to learn. I
started reading Dive Into Python and anything I could find and started
participating here in usenet. Then I had to read this:

http://www.comp.leeds.ac.uk/nde/papers/teachpy3.html

I think that every time I start a new technology (to me) it is about
to change. Yes, I know that is the nature of things, but I'm always
at the start of "something new."

If I continue in Python 2.5.x, am I making a mistake? Is it really
that different?

Here is an excerpt that is causing me concern:

Two new versions of the language are currently in development: version
2.6, which retains backwards compatibility with previous releases; and
version 3.0, which breaks backwards compatibility to the extent that
even that simplest of programs, the classic 'Hello, World', will no
longer work in its current form.

It makes me feel like I am wasting my time and makes it difficult to
justify spending time on projects using 2.5.x and using it where I
work.

The above statement is greatly exaggerated. Yes, print will become a
function so

print "hello world"

won't work anymore. But most of python will stay the same, and you certainly
don't waste time. Learning 2.x is perfectly sensible, as it is the stable
version supported by e.g. providers and of course the community - and will
be so for years to come.

Diez
 
M

Mike Driscoll

I am a new Python programmer. I have always desired to learn Python,
but have never had the opportunity. Recently this has changed, and I
have an opportunity to get away from the .NET framework. I found
Django (and other web frameworks) and began my quest to learn. I
started reading Dive Into Python and anything I could find and started
participating here in usenet. Then I had to read this:

http://www.comp.leeds.ac.uk/nde/papers/teachpy3.html

I think that every time I start a new technology (to me) it is about
to change. Yes, I know that is the nature of things, but I'm always
at the start of "something new."

If I continue in Python 2.5.x, am I making a mistake? Is it really
that different?

Here is an excerpt that is causing me concern:

Two new versions of the language are currently in development: version
2.6, which retains backwards compatibility with previous releases; and
version 3.0, which breaks backwards compatibility to the extent that
even that simplest of programs, the classic 'Hello, World', will no
longer work in its current form.

It makes me feel like I am wasting my time and makes it difficult to
justify spending time on projects using 2.5.x and using it where I
work.

Just because there's a new version on the horizon that doesn't mean
you have to upgrade to it. There are plenty of people that still use
2.3, such as my web host. I've only just started really using 2.5 this
year.

Mike
 
R

Roy Smith

Marc 'BlackJack' Rintsch said:
There will be a `2to3.py` program coming with Python 2.6 that tries to
convert most changes automatically. You may have to change the 2.6 code
in a way that makes the automatic conversion possible but it is a
important goal for the Python developers to make the transition as smooth
as possible as far as I can tell.

People who have been using good software engineering practices like writing
lots of automated tests, will have some confidence that the conversion went
well. People who haven't written any tests will probably be afraid of any
big changes to the environment (and rightfully so).


But, to answer the OP's question, to wit, "If I continue in Python 2.5.x,
am I making a mistake?", I would say not.

For somebody learning a new language, what you seek is stability. You want
everything to be well documented, and to work as documented. You want a
large community of people who already know what you are learning, and are
able to help. Likewise, you want a good selection of books to provide
tutorial and reference help. And a good set of well-tested tools and
add-on modules. You'll get all those from Python 2.5.

If you go with 3.0, you'll be on the bleeding edge. My advice is to stay
with what's stable today and come back and look at 3.0 in a year or so when
you know what you're doing better, and the ecosystem has caught up with
code. And, write those automated tests, so when the time does come to
switch, you can do so with confidence :)
 
S

Steve Holden

Mike said:
Just because there's a new version on the horizon that doesn't mean
you have to upgrade to it. There are plenty of people that still use
2.3, such as my web host. I've only just started really using 2.5 this
year.
And for what it's worth, even after the 2.6/3.0 release (they are both
due out simultaneously in August, modulo slippage) the python.org site
will be advising new users to go with 2.6. The 2.X series will continue
to be supported for some time (years) after the release of 3.0.

regards
Steve
 
J

John Nagle

jmDesktop said:
If I continue in Python 2.5.x, am I making a mistake? Is it really
that different?

No. It may never happen, either. The Perl crowd tried
something like this, Perl 6, which was announced in 2000 and still
hasn't come out. The C++ standards committee has been working on a
revision of C++ since the 1990s, and that hasn't happened either.

The general consensus is that Python 3.x isn't much of an
improvement over the existing language. There's just not much
demand for it.

John Nagle
 
I

Istvan Albert

The general consensus is that Python 3.x isn't much of an

there are a number of unfortunate typos in there that interfere with
the message,

instead of "The general consensus is" I think you actually meant "In
my opinion"

i.
 
C

Christian Heimes

jmDesktop said:
If I continue in Python 2.5.x, am I making a mistake? Is it really
that different?

I'm speaking as a long time Python user and Python core developer here.

You are safe to ignore Python 3.0 for now. :] You can start worrying
about the 3.x series in 2010 when Python 3.1 is out and most libraries
are ported to 3.x.

Christian
 
T

Terry Reedy

| Two new versions of the language are currently in development: version
| 2.6, which retains backwards compatibility with previous releases; and
| version 3.0, which breaks backwards compatibility to the extent that
| even that simplest of programs, the classic 'Hello, World', will no
| longer work in its current form.

That change is however, the one most immediately visible to new
programmers. Most of the other statements are pretty much unchanged. In
any case, 'print' is an easy-to-use facade over sys.stdout.write(), with
default formatting. If really concerned about it, start programs with
import sys
write = sys.stdout.write
and use that to write out explicitly formatted strings. (Some people
routinely do this for production code anyway.)

tjr
 
J

John Machin

| Two new versions of the language are currently in development: version
| 2.6, which retains backwards compatibility with previous releases; and
| version 3.0, which breaks backwards compatibility to the extent that
| even that simplest of programs, the classic 'Hello, World', will no
| longer work in its current form.

That change is however, the one most immediately visible to new
programmers. Most of the other statements are pretty much unchanged. In
any case, 'print' is an easy-to-use facade over sys.stdout.write(), with
default formatting. If really concerned about it, start programs with
import sys
write = sys.stdout.write
and use that to write out explicitly formatted strings. (Some people
routinely do this for production code anyway.)

tjr

Some C tragics do things like this, which appear to be 3.0-proof:
def fprintf(f, fmt, *vargs):
f.write(fmt % vargs)

Cheers,
John
 
G

Gerhard Häring

John said:
No. It may never happen, either. The Perl crowd tried
something like this, Perl 6, which was announced in 2000 and still
hasn't come out. The C++ standards committee has been working on a
revision of C++ since the 1990s, and that hasn't happened either.

The general consensus is that Python 3.x isn't much of an
improvement over the existing language. There's just not much
demand for it.

The difference is that Guido learnt from the mistakes of Perl 6 and set
much more realistic (moderate) goals for Python 3.0.

Unlike others, I think that Python 3.0 will get popular sooner than you
think. Imagine:

- you're the developer of an Open Source Python library
- for fame and glory, you port it to Python 3.0
- you realize that maintaining two branches is cumbersome
- Python 3.0 becomes first class
- Users switch to ...

-- Gerhard
 
C

Carl Banks

No. It may never happen, either. The Perl crowd tried
something like this, Perl 6, which was announced in 2000 and still
hasn't come out. The C++ standards committee has been working on a
revision of C++ since the 1990s, and that hasn't happened either.

You're not paying attention if you think there's it's still doubt over
whether Python 3 will happen.

The general consensus is that Python 3.x isn't much of an
improvement over the existing language.

I'm going to have to opine that you pulled this out of your ass.

There's just not much demand for it.

Well that's a little mode defensible seeing that we really don't know
how people will react.


Carl Banks
 
R

Roy Smith

Gerhard Häring said:
The difference is that Guido learnt from the mistakes of Perl 6 and set
much more realistic (moderate) goals for Python 3.0.

Another difference is that by the time Perl 6 was being worked on, there
were other new things on the horizon. People wanting something better than
Perl 5 were looking at Python, Ruby, or Tcl. You're not going to convince
your customers to upgrade to a new flavor of duct tape when they're already
playing with velcro.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top