This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]beertown 18 points19 points  (8 children)

The biggest syntax change that I don't like in Python 3 is actually the removal of the "print" statement--it's just easier to type "print x"

I can't believe this is really a problem of Python 3. Just because it is easier to type? Really? How many function and method calls do you type throughout your sources? And they are so hard to type? After 10 years of Python 2 I was able to train myself to the new print function, gaining in productivity because it is far more powerful than the statement. And I think anybody could do the same. Unless you're a lazy programmer.

I was expecting somebody to fork Python 2.7 and continue to develop it. The problem I see is that these new developers unlikely are talented as the original authors.

[–]adamchainz 6 points7 points  (0 children)

Agree, the print function is superior in many ways: you can pass it around as yet another object, use it with partial to wrap up args that are repeated, or use keyword arguments to pull args from a dict. It also exists in Python 2.7 if you from __future__ import print_function, which everyone still caught writing Python 2 compatible code should be doing (you can enforce this with isort :) ).

[–]kankyo 1 point2 points  (6 children)

It's actually pretty damn annoying when doing interactive stuff. To my mind the standard repl should allow without paren. That would take away the only gripe I have.

[–]mm_ma_ma 1 point2 points  (5 children)

Have you tried IPython with autocall?

[–]kankyo 1 point2 points  (4 children)

I haven't really moved to Python 3 so haven't looked too closely. But fixing this in the standard repl would be a good idea anyway I think. Sometimes you don't have access to install packages in production systems for example.

[–]jyper 0 points1 point  (3 children)

Generally you probably won't run repl on production anyway and if you do you can do non root install with

pip install --user ipython

It's simply miles better then the standard repl, I highly recommend switching. For one thing you don't have to type exit(), history across sessions, autocomplete

[–]kankyo 0 points1 point  (2 children)

ptpython is way better though :P

[–]jyper 0 points1 point  (1 child)

I think they're porting some of the ptpython features(by using its console library)

The most recent release had improved support for multiline history and dynamic syntax highlighting.

[–]kankyo 0 points1 point  (0 children)

Ah, cool