Live data from Hacker News

What’s New in Python 3.0

docs.python.org

1–10 of 43 posts

Re: What’s New in Python 3.0

#2
I love the changes to the language to remove the warts and to improve consistency across the language. Python thrives on consistency and always having exactly one obvious, readable way to do something. I welcome the simplified integer math, print function, unicode string unification, and other changes.

However, the biggest change, potentially, is function annotation. Function annotation brings the possibility of an extra level of documentation in code, of static-style type-checking which can easily be turned off in production, and of a standardized design by contract programming style.

Hopefully, we will have even bigger, easier to understand Python programs!

Re: What’s New in Python 3.0

#3
print("fatal error", file=sys.stderr)

So, Python has become even less succinct for the sake of "consistency".

I think there is only one flawless, absolutely consistent machine, and that's Turing machine. The urge for consistency and simplification (I mean, if you are consistent in your aspiration for consistency) inevitably leads to reinventing the Turing machine in its purity. It's OK, except for some reason nobody wants to program for it.

Re: What’s New in Python 3.0

#4
post #3

print("fatal error", file=sys.stderr) So, Python has become even less succinct for the sake of "consistency". I think there is only one flawless, absolutely consistent machine, and that's Turing machine. The urge for consistency and simplification (I mean, if you are consistent in your aspiration for consistency) inevitably leads to reinventing the Turing machine in its purity. It's OK, except for some reason nobody…

print >>sys.stderr, "fatal error"

Considering this is this old version of what you copied, I don't think anything has been lost...

Re: What’s New in Python 3.0

#5
post #4
post #3

print("fatal error", file=sys.stderr) So, Python has become even less succinct for the sake of "consistency". I think there is only one flawless, absolutely consistent machine, and that's Turing machine. The urge for consistency and simplification (I mean, if you are consistent in your aspiration for consistency) inevitably leads to reinventing the Turing machine in its purity. It's OK, except for some reason nobody…

print >>sys.stderr, "fatal error" Considering this is this old version of what you copied, I don't think anything has been lost...

I never liked that either, but the new version is physically longer and requires more typing. Moreover, I couldn't find any change in 3.0 that results in less typing. I might have missed something of course, but this announcement doesn't seem to be something to be excited about.

I was waiting, for example, lambdas to be allowed to have compound statements. Python, a nice language otherwise, could have been improved in many ways, none of which is found in 3.0.

Instead, the spirit of Python is coming closer and closer to Java: you are not supposed to do this, says Python to you, because it's a bad practice and can lead to errors.

I'm disappointed and I think I'd rather wait for another, more concise nobraces programming language.

Re: What’s New in Python 3.0

#6
I really wish they had added real lambdas.

Don't get me wrong, these changes seem good. But every time I hear about a new Python release I keep hoping that I'll see they've finally reversed their policy about lambdas and made a real one instead of the compromise they have right now.

Re: What’s New in Python 3.0

#7
post #5
post #4

Earlier quoted context omitted.

print >>sys.stderr, "fatal error" Considering this is this old version of what you copied, I don't think anything has been lost...

I never liked that either, but the new version is physically longer and requires more typing. Moreover, I couldn't find any change in 3.0 that results in less typing. I might have missed something of course, but this announcement doesn't seem to be something to be excited about. I was waiting, for example, lambdas to be allowed to have compound statements. Python, a nice language otherwise, could have been improved i…

from pep 3099:

    At one point lambda was slated for removal in Python 
    3000. Unfortunately no one was able to come up with a 
    better way of providing anonymous functions. And so 
    lambda is here to stay.

    But it is here to stay as-is. Adding support for 
    statements is a non-starter. It would require allowing 
    multi-line lambda expressions which would mean a  
    multi-line expression could suddenly exist. That would  
    allow for multi-line arguments to function calls, for  
    instance. That is just plain ugly.
Thread: "genexp syntax / lambda", http://mail.python.org/pipermail/python-3000/2006-April/0010...

Re: What’s New in Python 3.0

#8
post #3

print("fatal error", file=sys.stderr) So, Python has become even less succinct for the sake of "consistency". I think there is only one flawless, absolutely consistent machine, and that's Turing machine. The urge for consistency and simplification (I mean, if you are consistent in your aspiration for consistency) inevitably leads to reinventing the Turing machine in its purity. It's OK, except for some reason nobody…

You can always consider print as low-level feature and wrap the whole thing in a fancy stream.

    class err_class:
        def __lshift__(self,other):
            print(other)
            return self

    err = err_class()
    err

Re: What’s New in Python 3.0

#9
post #8
post #3

print("fatal error", file=sys.stderr) So, Python has become even less succinct for the sake of "consistency". I think there is only one flawless, absolutely consistent machine, and that's Turing machine. The urge for consistency and simplification (I mean, if you are consistent in your aspiration for consistency) inevitably leads to reinventing the Turing machine in its purity. It's OK, except for some reason nobody…

You can always consider print as low-level feature and wrap the whole thing in a fancy stream. class err_class: def __lshift__(self,other): print(other) return self err = err_class() err

Of course I can do it, then why isn't it done already in the language?

Printing is something we do all the time in server applications, and that means, the printing facility in the language should be polished to death.

Re: What’s New in Python 3.0

#10

I really wish they had added real lambdas. Don't get me wrong, these changes seem good. But every time I hear about a new Python release I keep hoping that I'll see they've finally reversed their policy about lambdas and made a real one instead of the compromise they have right now.

what does a real one consitute of?

and why do you want that? i use pyhton as a superb general-purpose language and for gluing together a lot of different parts of software/programs.

for that purpose, simplicity and readability is essential.

Post reply on HN