Live data from Hacker News

The Case Against Python 3

learnpythonthehardway.org

191–200 of 281 posts

Re: The Case Against Python 3

#191
post #117

Earlier quoted context omitted.

Is this actually a joke? I'm still kind of reeling. The typos, the technical inaccuracies, the logical fallacies, all bundled together... Is it trying to satirize something? If not, what is the blog post trying to do?

He definitely is... I just checked his twitter to make sure I'm right. He's clearly joking. https://mobile.twitter.com/zedshaw

Should be clearly stated on the page. Because Poe's law.

Re: The Case Against Python 3

#192
post #77

Earlier quoted context omitted.

Can the conclusion stand if the arguments are not correct? I'm sure there are other, better arguments out there, but after reading this from top to bottom I'm getting the idea that the resistance to Python 3 is mostly irrational.

> Can the conclusion stand if the arguments are not correct? It can; arguing it can't would be an 'argument from fallacy', itself a fallacy. Put another way, I can make up a totally absurd, incorrect argument that the sky is blue, but the sky is still blue. I can also make up a totally absurd, incorrect argument that the sky is green, but it isn't. An argument that doesn't hold water doesn't say anything useful about…

That said, the conclusion is still false, given how many projects have since converted to or supported Python 3. And a bunch are Python 3 only.

Re: The Case Against Python 3

#193
This article was written in the mental state of hate. The author may well reread it, and remove all the hate. He can have the opinion that Python3 is not suited for teaching where Python2 is, but his arguments are in fact just opinions.

Another problem in the tone: no respect for his readers.

    "if *I* struggle to use Python's strings then you don't have a chance."

Re: The Case Against Python 3

#194

Earlier quoted context omitted.

zip in py2 returns a tuple type (i.e tries to consumes the iterator through a StopIteration) in py3 it returns a iterator (consumes it on demand). Try this in py2: https://repl.it/E5vd/0

I'm not near a real REPL, what's the diff? Eager vs. lazy? I think I remember reading something about that change awhile ago.

Exactly. Py3 zip is lazy like py2 izip.

Re: The Case Against Python 3

#195
post #61

Howdy Zed, there's a small typo in your printf statement. As written, x = 'Zed' print f"Howdy {x}" Should read, x = 'Zed' printf "Howdy {x}" I was under the suspicion that, "f" was some sort of operator or something, much like q is for Perl, print q{Howdy Zend};

nope it should be print(f"Howdy {x}") It's a new python 3.6 feature called f-strings/string interpolation https://docs.python.org/3.6/reference/lexical_analysis.html#... That said in python3 print is a function not a statement and requires parenthesis so he still has a typo.

I know f-strings but I still can't believe them.

There are parts of Python that look like it wants programmers do low level compiler job and I can't understand why. This is one of them. Python can do %s string interpolation without some s'' s-strings so I wonder why it needs this f-string thing. Many languages can do string interpolation without having developers babysitting the interpreter. In 2016 we have the CPUs to make it happen the other way around.

Re: The Case Against Python 3

#196
post #2

> Currently you cannot run Python 2 inside the Python 3 virtual machine. Since I cannot, that means Python 3 is not Turing Complete and should not be used by anyone. I stopped there.

same. i can't tell if he's serious or not and i don't really care.

Re: The Case Against Python 3

#197
post #188

Earlier quoted context omitted.

I used C as an example of what happens when you don't change, not what happens when you do. C is used decades later with little change because of momentum and history, not because it's the pinnacle of computer languages. C is not a good language. It was a good language, but that was a few decades ago. We've progressed past the point where C's shortcomings are excused by there not being alternatives that address those…

What's replacing C? I can see languages like go/rust/crystal replacing C++ for application development, but what's producing stable binaries that other languages can consume in the same way the do C ones?

Rust can produce C compatible libraries. Go apparently can too. I suspect a little googling would show me that Nim and D can as well. I'm sure there are at least a few more.

Re: The Case Against Python 3

#198
post #185

Earlier quoted context omitted.

As someone who's used Python 2 for the past half decade and started using Python 3 only recently, 100% with you on this. The first time I was working on a project which required me to be able to work with characters beyond ASCII, I was so confused. To this date, I'm still not sure if I can actually explain what str.encode and str.decode do in Python 2. Admittedly I've never used Python 3 for a project where I had to…

> his point about the concatenation of unicode and bytearrays certainly seems a valid point This is one of those subjects where I feel like being a non-English programmer has given me surprisingly valuable experience. The operation of concatenating a text value (string) and binary data (byte array) simply does not make sense, for two reasons. What do you expect the result to be? 1. Binary data with the text appended.…

For the record:

    Python 3.5.2 (default, Nov  7 2016, 11:31:36) 
    [GCC 6.2.1 20160830] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> u'' + b''
    Traceback (most recent call last):
      File "", line 1, in 
    TypeError: Can't convert 'bytes' object to str implicitly
    >>> u'' + bytearray()
    Traceback (most recent call last):
      File "", line 1, in 
    TypeError: Can't convert 'bytearray' object to str implicitly
And I agree wholeheartedly. This is the only sane thing to do.

Re: The Case Against Python 3

#199
post #185

Earlier quoted context omitted.

As someone who's used Python 2 for the past half decade and started using Python 3 only recently, 100% with you on this. The first time I was working on a project which required me to be able to work with characters beyond ASCII, I was so confused. To this date, I'm still not sure if I can actually explain what str.encode and str.decode do in Python 2. Admittedly I've never used Python 3 for a project where I had to…

> his point about the concatenation of unicode and bytearrays certainly seems a valid point This is one of those subjects where I feel like being a non-English programmer has given me surprisingly valuable experience. The operation of concatenating a text value (string) and binary data (byte array) simply does not make sense, for two reasons. What do you expect the result to be? 1. Binary data with the text appended.…

That's a pretty fair point, and I completely agree that the Python 2 result is pretty ridiculous.

In zed's defense, it still does seem like a rather daunting error for a beginner programmer - although like you, I have no good viable alternative to suggest.

Re: The Case Against Python 3

#200

Earlier quoted context omitted.

All stable versions of the big ML frameworks are still 2.7.

Not true. Please specify which ML library authors are obtuse. About the only thing that is dead like that seems to be Enthought project for drawing and creating UI for graphs.

Sorry, should have said run better. There is support for latest 3.x branch, but everyone uses 2.7 as it's less bugguy.
Post reply on HN