[Baypiggies] Companies moving to Python 3?

wesley chun wescpy at gmail.com
Sat Oct 17 00:47:26 CEST 2015


I agree with Aahz & JJ:



On Thu, Oct 15, 2015 at 6:00 PM, Shannon -jj Behrens <jjinux at gmail.com>
 wrote:

> > I'm going to say the unpopular thing. Python 3 to Python is Perl 6 to
> Perl.
>
> Perl 6 is *very* different than Perl. The syntax is different, and the
> implementation is entirely redone. It also took a really long time to come
> out. None of those things are particularly true of Python 3. There are only
> a few syntactic differences, it didn't take that long to come out, and it's
> not an entirely new implementation.
>

I get where Wai-Yip is coming from, and it's okay to have that perspective,
but the future really is Python 3, or at least PyPy. The comparisons don't
work because as JJ mentioned, it's not an entirely new implementation.
Broad adoption has been hampered mainly by package availability (you're not
going to port if your dependencies haven't), and that gap is narrowing
every day. Here's a graph <http://www.pocoo.org/~gbrandl/py3pkgs.png>
representing the # of Python 3 packages in the Cheeseshop
<http://pypi.python.org> up to the end of 2014Q1.... while it's not
current, you can extrapolate the trend (to arrive at today's count, which
is ~12,400[!]):

[image: Inline image 1]

Django, Flask, various MySQL adapters, NumPy, and SciPy were pretty big
milestones. Even the Google APIs Client Library is now available for Python
3 users <http://goo.gl/OfCbOz> (and I didn't expect *that* to happen in
2015).

>> From my point of view, 2 is a teaching language, a joy to teach.  Python
3, not as much.
>

> >I really can't think of any reasons why Python 3 isn't a teaching
language. I've seen several books teaching kids to program that use Python
3.
>
>> I don't how I'm going to teach classes (blueprints for objects) when I
have to skip classic classes.
>
> I don't understand that either. Classes, methods, objects, etc. are all
available in new style classes. Actually, when you're teaching OOP from
scratch new style vs. old style classes just don't matter that much.

There should be no real stark differences b/w teaching 2.x or 3.x... at
least not until you hit the network. The only minor thing to include is how
some functions/methods that previously returned lists now return iterators.
When you get to networking or text processing, you'll have to talk about
massaging bytes into strings. Aahz' example code snippet emphasizes that
the "classic class" syntax creates new-style classes in 3.x, meaning you
don't need to talk about "(object)" until the time is right.

As a result, all my Python courses are both 2.x & 3.x at the same time, and
the same is true of my books. In fact, many of my code snippets will run
unmodified on 2.x & 3.x interpreters since they're so short, without the
use of a 3rd-party library like six, python-modernize, or future, although
using packages like those is a good practice moving forward.

When 3.0 was released in 2008, its backwards-compatibility and my sense of
how fast the software industry moves made me call "a decade" before
everyone has migrated to 3.x. We've got 3 years left, so I think we're "on
track."

> I thought the killer app is Unicode.  I wonder if this list wasn't in
> English, in an English-speaking (mostly) country, if we'd be seeing more
> Python 3 in action?
>
> Python 2 has Unicode support, so you can't call that the killer feature.
> The closest things that Python 3 has to a killer feature are "yield from",
> asyncio (which was somewhat backported), and the ability to annotate
> parameters, etc. so that you can use a nice static type annotation checker.
>
> > Unicode is real important outside of our culture, isn't it?
>
> Yes, but it's humorous to remember that some cultures, like Japan, resent
> Unicode for fairly esoteric reasons ;)
>

Correct. Unicode is just another string type. Yes, it so happens to be the
default type in 3.x, but that's for the better. It's not a "killer app,"
but a feature that needed to happen to help Python evolve and opens the
doors globally. There *is* no culture in software engineering... just the
need to write code that can handle well more data than the narrow world of
7-bit ASCII. Remember, it's not "Unicode vs. ASCII," but "text vs. data."
(I have to admit that it's a bit more troublesome working with data that
comes from and goes to the network in 3.x though.)

Cheers,
-- Wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"A computer never does what you want... only what you tell it."
    +wesley chun <http://google.com/+WesleyChun> : wescpy at gmail : @wescpy
<http://twitter.com/wescpy>
    Python training & consulting : http://CyberwebConsulting.com
    "Core Python" books : http://CorePython.com
    Python blog: http://wescpy.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20151016/dfa300dd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: py3pkgs.png
Type: image/png
Size: 1390 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20151016/dfa300dd/attachment.png>


More information about the Baypiggies mailing list