myths about python 3

D

Daniel Fetchinson

Hi folks,

I was going to write this post for a while because all sorts of myths
periodically come up on this list about python 3. I don't think the
posters mean to spread false information on purpose, they simply are
not aware of the facts.

My list is surely incomplete, please feel free to post your favorite
misconception about python 3 that people periodically state, claim or
ask about.

1. Print statement/function creates incompatibility between 2.x and 3.x!

Certainly false or misleading, if one uses 2.6 and 3.x the
incompatibility is not there. Print as a function works in 2.6:

Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57)
[GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

2. Integer division creates incompatibility between 2.x and 3.x!

Again false or misleading, because one can get the 3.x behavior with 2.6:

Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57)
[GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.1.2


Please feel free to post your favorite false or misleading claim about python 3!

Cheers,
Daniel
 
S

Stefan Behnel

Daniel Fetchinson, 27.01.2010 11:32:
1. Print statement/function creates incompatibility between 2.x and 3.x!

Certainly false or misleading, if one uses 2.6 and 3.x the
incompatibility is not there. Print as a function works in 2.6:

Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57)
[GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.hello

This is actually misleading by itself, as the first statement is not a
function call in Py2:

Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information. (1, 2)

It can, however, be made a function call through a future import in 2.6:
1 2

Stefan
 
D

Daniel Fetchinson

1. Print statement/function creates incompatibility between 2.x and 3.x!
Certainly false or misleading, if one uses 2.6 and 3.x the
incompatibility is not there. Print as a function works in 2.6:

Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57)
[GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
print( 'hello' ) hello
print 'hello'
hello

This is actually misleading by itself, as the first statement is not a
function call in Py2:

Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.(1, 2)

It can, however, be made a function call through a future import in 2.6:
1 2

Thanks! This is true, luckily you provided a better solution and the
conclusion is not changed, as long as print is concerned, 2.6 and 3.x
can trivially be made compatible.

Surely there are incompatibilities, but first of all there are many
tools that help the transition such as 2to3 and there is a clear and
officially documented migration guide too (quoted by Steve Holden in
another thread not so long ago), second of all the most vocal
arguments that one hears mostly from ill-informed people are related
to print and similar non-issues. These then get quoted over and over
again, which led me to write this post :)

Cheers,
Daniel


Cheers,
Daniel
 
G

Grant Edwards

Arguably, Python 3 has been rejected by the market.

Let's just say that it hasn't yet been accepted by the market. ;)
Instead, there's now Python 2.6, Python 2.7, and Python 2.8.
Python 3 has turned into a debacle like Perl 6, now 10 years
old.

I think I'd have to wait a couple more years before making that
sort of pronouncement.

That said, I don't expect to start using Python 3 until library
availability or my Linux distro forces me to.
 
J

John Nagle

Daniel said:
Hi folks,

I was going to write this post for a while because all sorts of myths
periodically come up on this list about python 3. I don't think the
posters mean to spread false information on purpose, they simply are
not aware of the facts.

My list is surely incomplete, please feel free to post your favorite
misconception about python 3 that people periodically state, claim or
ask about.

Myths about Python 3:

1. Python 3 is supported by major Linux distributions.

FALSE - most distros are shipping with Python 2.4, or 2.5 at best.

2. Python 3 is supported by multiple Python implementations.

FALSE - Only CPython supports 3.x. Iron Python, Unladen Swallow,
PyPy, and Jython have all stayed with 2.x versions of Python.

3. Python 3 is supported by most 3rd party Python packages.

FALSE - it's not supported by MySQLdb, OpenSSL, feedparser, etc.

Arguably, Python 3 has been rejected by the market. Instead, there's
now Python 2.6, Python 2.7, and Python 2.8. Python 3 has turned into
a debacle like Perl 6, now 10 years old.

That's the reality, Python 3 fanboys.

John Nagle
 
A

Adam Tauno Williams

Myths about Python 3:
1. Python 3 is supported by major Linux distributions.
FALSE - most distros are shipping with Python 2.4, or 2.5 at best.

CentOS: python26-2.6.4-1.ius.parallel.el5

openSUSE: python-2.6.2-6.3.i586, python3-3.1-3.3.i586

Darn, those pesky facts.
2. Python 3 is supported by multiple Python implementations.
FALSE - Only CPython supports 3.x. Iron Python, Unladen Swallow,
PyPy, and Jython have all stayed with 2.x versions of Python.

And of all Python development what percentage takes place on all those
combined? 2%? Maybe.
 
B

Benjamin Kaplan

Myths about Python 3:

1.  Python 3 is supported by major Linux distributions.

       FALSE - most distros are shipping with Python 2.4, or 2.5 at best.
The latest versions of Ubuntu Jaunty and Karmic, Fedora 11 and 12, and
OpenSUSE 11.2 all use Python 2.6. Ubuntu has been shipping python 3
since Jaunty came out last April. According to Fedora's package index,
Python 3 is in the devel version which probably means it will be in
upcoming versions of Fedora as well.

2.  Python 3 is supported by multiple Python implementations.

       FALSE - Only CPython supports 3.x.  Iron Python, Unladen Swallow,
       PyPy, and Jython have all stayed with 2.x versions of Python.
When Python 2.6 came out, Jython was still on 2.2. The difference
between 2.2 and 2.6 is almost as big of a difference as between 2.6
and 3.0. In that time, you had the introduction of the boolean type,
generators, list comprehensions, the addition of the "yield" and
"with" keywords, universal newline support, and decorators in addition
to the large number of changes to the standard library such as the
introduction of the subprocess module.
3.  Python 3 is supported by most 3rd party Python packages.

       FALSE - it's not supported by MySQLdb, OpenSSL, feedparser, etc.

Arguably, Python 3 has been rejected by the market.  Instead, there's
now Python 2.6, Python 2.7, and Python 2.8.  Python 3 has turned into
a debacle like Perl 6, now 10 years old.

Give the package maintainers time to update. There were some pretty
big changes to the C API. Most of the major 3rd party packages like
numpy and MySQLdb have already commited to having a Python 3 version.
They just haven't gotten them out yet.
 
A

Adam Tauno Williams

Give the package maintainers time to update. There were some pretty
big changes to the C API. Most of the major 3rd party packages like
numpy and MySQLdb have already commited to having a Python 3 version.
They just haven't gotten them out yet.

PostgreSQL support is available for Python3.

Just switch to using a real database and one of you problems is
solved. :)
 
C

Carl Banks

Arguably, Python 3 has been rejected by the market.

No it's not fathomably arguable, because there's no reasonable way
that Python 3 could have fully replaced Python 2 so quickly.

At best, you could reasonably argue there hasn't been enough time to
tell.

 Instead, there's
now Python 2.6, Python 2.7, and Python 2.8.

It was always the plan to continue developing Python 2.x alongside
Python 3.x during the transition period.

Last I heard, don't remember where, the plan was for Python 2.7 to be
the last version in the Python 2 line. If that's true, Python 3
acceptance is further along at this point than anticipated, since they
originally thought they might have to go up to 2.9.

 Python 3 has turned into
a debacle like Perl 6, now 10 years old.

Perl 6 has never been released. The situations aren't even
comparable.

That's the reality, Python 3 fanboys.

You're the fanboy, fanboi. You are so hellbent on badmouthing Python
3 that you throw three ridiculous, straw-grasping arguments at us.

Here's the real reality.

Python 3 is going to replace Python 2, and it has nothing to do with
technical merit. The developers are planning to stop development on
2.x line, and only continue with 3.x, so anyone who wants to stay
current--which is most people--with Python will have to use 3.x.
There is no hope that developers will be pressured by the market to
change their plans; we would have seen enough of a backlash by now.
There is also no hope someone will fork Python 2.x and continue it in
perpetuity. Well, someone might try to fork it, but they won't be
able to call it Python. No, don't be silly, a fork of Python not
called Python won't gain market share.

So rail if it makes you feel better but you've already lost.


Carl Banks
 
E

exarkun

No it's not fathomably arguable, because there's no reasonable way
that Python 3 could have fully replaced Python 2 so quickly.

At best, you could reasonably argue there hasn't been enough time to
tell.

It was always the plan to continue developing Python 2.x alongside
Python 3.x during the transition period.

Last I heard, don't remember where, the plan was for Python 2.7 to be
the last version in the Python 2 line. If that's true, Python 3
acceptance is further along at this point than anticipated, since they
originally thought they might have to go up to 2.9.

This assumes that the decision to stop making new 2.x releases is based
on Python 3 adoption, rather than on something else. As far as I can
tell, it's based on the personal desire of many of the core developers
to stop bothering with 2.x. In other words, it's more a gauge of
adoption of Python 3 amongst Python core developers.

Jean-Paul
 
M

Mensanator

Myths about Python 3:

1.  Python 3 is supported by major Linux distributions.

        FALSE - most distros are shipping with Python 2.4, or 2.5 at best.

So? I use Mac OSX 10.6, not Linux. And that comes with 2.6.
Nothing stopped me from adding 3.1.
2.  Python 3 is supported by multiple Python implementations.

        FALSE - Only CPython supports 3.x.  Iron Python, Unladen Swallow,
        PyPy, and Jython have all stayed with 2.x versions of Python.

So? I only use CPython.
3.  Python 3 is supported by most 3rd party Python packages.

        FALSE - it's not supported by MySQLdb, OpenSSL, feedparser, etc.

So? The only 3rd party module I use is gmpy, and that's been updated
to 3.x.
Arguably, Python 3 has been rejected by the market.  Instead, there's
now Python 2.6, Python 2.7, and Python 2.8.  Python 3 has turned into
a debacle like Perl 6, now 10 years old.

That's the reality, Python 3 fanboys.

Maybe in *your* world. I'm perfectly happy in my world using 3.1.
 
T

Terry Reedy

2. Python 3 is supported by multiple Python implementations.

FALSE - Only CPython supports 3.x. Iron Python, Unladen Swallow,
PyPy, and Jython have all stayed with 2.x versions of Python.

Actually, Unladen Swallow is now targeted at 3.1; its developers have
conservatively proposed its integration in CPython 3.3. I would not be
completely shocked if it happens in 3.2.
Arguably, Python 3 has been rejected by the market.

Almost everything is 'arguable'. Based on experience, Guido never
expected major uptake until 3.2 (a year away).
> Instead, there's now Python 2.6,

Just who produced that? and why?
Python 2.7,

Does not exist yet, but again, coming from the same devs for the purpose
of helping transition to 3.x.
> and Python 2.8.

Unlikely to ever exist.
Python 3 has turned into a debacle like Perl 6, now 10 years old.

You have to wait another 9 years to really say that. However, my
impression is that Python 3 alreays surpasses Perl 6.
That's the reality, Python 3 fanboys.

Why are you such a Python 3 hateboy?

Terry Jan Reedy
 
D

David Malcolm

The latest versions of Ubuntu Jaunty and Karmic, Fedora 11 and 12, and
OpenSUSE 11.2 all use Python 2.6. Ubuntu has been shipping python 3
since Jaunty came out last April. According to Fedora's package index,
Python 3 is in the devel version which probably means it will be in
upcoming versions of Fedora as well.

FWIW, more information on Fedora python 3 status here:
https://fedoraproject.org/wiki/Features/Python3F13

[snip]
Give the package maintainers time to update. There were some pretty
big changes to the C API. Most of the major 3rd party packages like
numpy and MySQLdb have already commited to having a Python 3 version.
They just haven't gotten them out yet.

I'll take this opportunity to make a shameless plug for my 2to3c tool:
http://dmalcolm.livejournal.com/3935.html

which takes some of the grunt work out of taking C code and making it
compilable against both 2 and 3. (it will still require a human to do
some of the work, alas).


Hope this is helpful
Dave
 
D

Daniel Fetchinson

Hi folks,
Myths about Python 3:

I said myths, not facts! :)

s/Myths/Facts/
1. Python 3 is supported by major Linux distributions.

FALSE - most distros are shipping with Python 2.4, or 2.5 at best.

This latter statement is false, Fedora 11 and 12 come with python 2.6.
2. Python 3 is supported by multiple Python implementations.

FALSE - Only CPython supports 3.x. Iron Python, Unladen Swallow,
PyPy, and Jython have all stayed with 2.x versions of Python.

This latter statement is false, unladen swallow is currently targeting
3.x and may even be merged into cpython 3.x.
3. Python 3 is supported by most 3rd party Python packages.

FALSE - it's not supported by MySQLdb, OpenSSL, feedparser, etc.

s/most/my favorite/

Actually, tons of 3rd party packages are already ported, postgres and
django are just 2 examples, the next release of PIL will be another.
Arguably, Python 3 has been rejected by the market. Instead, there's
now Python 2.6, Python 2.7, and Python 2.8. Python 3 has turned into
a debacle like Perl 6, now 10 years old.

These are the kinds of myths I had in mind when starting the thread.
All sorts of BS is kept circulating without any facts to back up the
claims. Actually, in this thread tons of rebuttals can be found to
your statements but I doubt you will change your mind :) Hopefully
others reading all of this will at least see what is BS and what is
the actual situation about python 3.

Cheers,
Daniel
 
E

Edward A. Falk

Hi folks,

1. Print statement/function creates incompatibility between 2.x and 3.x!

Certainly false or misleading, if one uses 2.6 and 3.x the
incompatibility is not there. Print as a function works in 2.6:

Yes, but does print as a statement work?

Your argument is that python 2.x code can be ported to 3.x and still
run under 2.6 if you're careful about how you do the port. That's
not the same as saying they're compatible.

2. Integer division creates incompatibility between 2.x and 3.x!

Same as above. Saying you can make it work by rewriting your code
is not the same as saying that it works.


If they'd wanted wide adoption of python 3, they should have made it
as compatible as possible with python 2 code. If they dropped the
print statement, then they did not do so.
 
E

Edward A. Falk

That said, I don't expect to start using Python 3 until library
availability or my Linux distro forces me to.

If python 3 is much more efficient than python 2, or it has features
I really need for some application I'll write in the future, I might
be tempted to switch. Maybe some future version of python 3 will
be compatible with python 2 source code. That would help.
 
S

Steven D'Aprano

Myths about Python 3:

1. Python 3 is supported by major Linux distributions.
2. Python 3 is supported by multiple Python implementations.
3. Python 3 is supported by most 3rd party Python packages.

A myth actually needs to be believed by some sector of the population,
even if a small one. (Isolated nut cases don't count.) Star Wars is not a
myth, because nobody -- not even those wacky people who put down "Jedi"
as their religion on census forms -- actually believes it is a
documentary.

I've never heard anyone claiming any of those three "myths". I conclude
that you just made them up, that they are fictional claims rather than
genuine myths mistakenly believed by some people. So, in that spirit,
here are three more for your collection. Perhaps you could start a list
on a website somewhere.

4. Python 3 will make you irresistible to women.

FALSE - Python 3 coders are no more likely to get a date than any
other programmer.

5. Python 3 programs cannot be buggy, no matter how poorly you code.

FALSE - programs written in Python 3 can contain bugs.

6. The code for Python 3 was handed down to Guido from the Heavens,
carved into stone tablets by the Gods themselves.

FALSE - Python 3 was designed and written by fallible human beings,
and consequently there is no guarantee that it will be perfect in
all ways for all purposes.


That's the reality, Python 3 fanboys.

Speaks for itself.
 
P

Paul Rubin

Steven D'Aprano said:
6. The code for Python 3 was handed down to Guido from the Heavens,
carved into stone tablets by the Gods themselves.

That is heresy. The direction was up, not down.
 
C

Carl Banks

This assumes that the decision to stop making new 2.x releases is based
on Python 3 adoption, rather than on something else.

I should have said, "If anything...".


Carl Banks
 
S

Steven D'Aprano

When Python 2.6 came out, Jython was still on 2.2. The difference
between 2.2 and 2.6 is almost as big of a difference as between 2.6 and
3.0. In that time, you had the introduction of the boolean type,
generators, list comprehensions, the addition of the "yield" and "with"
keywords, universal newline support, and decorators in addition to the
large number of changes to the standard library such as the introduction
of the subprocess module.

THANK YOU Benjamin for injecting this note of sanity into the discussion.

I believe that, with the possible exception of the change from byte
strings to unicode strings, virtually *all* the hoo-har over Python 3 is
simply due to the tactical mistake of Guido and the Python Dev team of
*calling* Python 3 a backward incompatible release. Python has had
previous major changes in the past (e.g. 1.5 to 2.0 and 2.1 to 2.2) and
hardly anyone made a complaint.

Certainly the move from 2.x to 3.x is a big move. If you have to support
both series simultaneously, I don't envy your job, but if CherryPy can do
it, so can others. But it's not qualitatively different from supporting
(say) 2.4 through 2.6. Targeting multiple versions is always a PITA.

I also find it telling that perhaps the biggest change of all, the one
from byte strings to unicode, hardly rates a mention from the skeptics
and haters. Instead we get rants about how division behaves differently
(forgetting that "from __future__ import division" has worked since at
least 2.4 and possibly older) and complaints that print is different.
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top