Live data from Hacker News

About Python 3

alexgaynor.net

201–210 of 358 posts

Re: About Python 3

#201

The funny thing is I was getting downvoted by the peanut gallery on proggit and other sites when I was pointing out, years ago, that there is no such thing as "Python", but really "Python 2" and "Python 3". It's nice to see that pythonistas are starting to accept what an outsider saw give years ago. Frankly the problem is a culture of overpromising and underdelivering that is endemic to Python. The situation with thr…

Threading in cPython is like recursion, it kind of works but is not the canonical way to write it.

I dare to say that in Python you should always convert a recursive algorithm to the iterative form, because cPython lacks tail call optimization common in functional languages and the default recursion dept is only 999; the same way you should also look for other patterns related to multitasking if the task is CPU bound (or look for GIL-free implementation).

I agree with you that these (and other) Python "gotchas" need more visibility; I don't think the language is broken - one could say the default implementation is broken, IMHO it is just not optimized for a couple classic software patterns. Once you start swimming with the current (using alternative patterns), you probably will find some of the design decisions very pragmatic.

Re: About Python 3

#202
As sad as it may sound, the most annoying thing about Python 3 for me is this:

print "Hi"

vs

print("hi")

Other than that, as Alex said there isn't much difference between the two.

Re: About Python 3

#203
post #23

I like to think of engineering as "solving problems within a system of constraints". In the physical world, engineering constraints are things like the amount of load a beam will bear. One of the primary easily-overlooked constraints in the software world is backwards compatibility or migration paths. There are many examples of systems where many look at them today and say: "This is terrible, I could design a better/…

HN loves to dump on C++, and in some senses I understand why, but Stroustrup had this figured out over 30 years ago. You don't break compatibility. For all the ugly warts in C++ due to the requirement for compatibility in C, I can take a C code base from the 80s (say a BLAS library or something), use it with my C++11 code, even using things like std::vector, std::string, or shared_ptr, without any real fuss. The idea that somebody will adopt a language very close to another language that they are already using is dubious at best. And that is what Python 3 is - a different language quite close to another perfectly good language. Why take on all the difficulties and heartache when I can just continue using this perfectly good language?

Re: About Python 3

#204
post #121
post #76

Earlier quoted context omitted.

Just out of curiosity, have you actually tried getting NumPy/SciPy working on Python 3? Because they've been fully supported for quite a while now. I don't understand how this myth keep perpetuating itself.

I'm not interested in even playing any more. Like I said, I haven't used Python 3 before today (after 18 years of programming Python). I would have cared, for example if Python 3 had any impact in the real world. Anyway, it took years for numpy support; it wasn't available until recently for python3. That's the problem: it took years before these common tools were proted.

>> I used Python 3 for the first time a few days ago

> Like I said, I haven't used Python 3 before today

Well, which is it? Neither makes you much of an authority on the subject.

Re: About Python 3

#205
post #166

Earlier quoted context omitted.

i like fast movement, i like communities that dare to break things every now and then (see semver.org for the widely accepted versioning rules and should be honoured). much do i prefer an increasingly better solution to a stable one. i'm not agueing "perfect" over "good enough"; i'm argueing "awesome" over "good enough" :)

You might be a great Microsoft developer. Use this API, no this one, nope now this one, you almost caught up, so we released a newer, more better one! Please buy Awesome Studio and RDMS 2015 or you are a loser. Here's a free version that can't do shit, the Pro version is only $2000, plus lots of your time adjusting to a newer mono/flat chrome development environment. Hot keys only for touch screen users!

Correct me if my history is a little fuzzy, but isn't it Apple that plays the part of "move fast, worry later" so well? After all, Apple has been the front-runner when it comes to things like, "f--k your floppy/CD drive/FireWire/display-adapter, we're moving on", and that's just in hardware.

Microsoft has actually done a pretty good job maintaining backwards compatibility, considering the size of their user base and variety of software to accommodate. Though perhaps that makes it a better metaphor for PHP development than Python.

Re: About Python 3

#206
Reading the comments on Hacker News whenever someone brings up the issues with the Python 3 transition are horribly painful due to a systemic bias in that the people who care to read and talk about Python 3: they are mostly people who are in the 2% of people who apparently care enough to have upgraded already; everyone [edit: "here who is saying" was incorrect; "here who normally says" If you cast a wider net, and talk to people at conferences that have nothing to do with fancy programming languages (and certainly not about Python itself), people aren't using Python 3, and the feelings about Python 3 are mostly "sarcastic bitterness" (where like, you bring up Python 3 and they kind of laugh a little like "yeah, no, obviously") surrounding the problem mentioned by this author that "for the last few years, for the average developer Python, the language, has not gotten better" while being told that upgrading is easy or somehow intrinsically valuable to them, which as this author points out comes across as the Python community just saying "fuck you" to their needs.

Re: About Python 3

#207
post #191

Fix the GIL. Python 3 isn't getting used because it breaks backwards compatibility without offering many meaningful benefits. Sure, the syntax clean ups and the new sugar are nice and all. But you don't rewrite a working code base because of "nice". So, fix the GIL; Replace the spaces indentations with tabs; Take out the stupid 79 line limit off PEP8; Even clean up the standard library... After all, if you don't need…

PEP8 revised the 79 char recommendation to 99: http://www.python.org/dev/peps/pep-0008/#maximum-line-length

It still doesn't agree with you about spaces vs. tabs though.

Re: About Python 3

#208
post #132

Earlier quoted context omitted.

Is there a particular reason for that? I can understand not wanting to ship GPLv3 code if it is embedded sufficiently deeply into the hardware, but it shouldn’t be a problem to ship GPLv3 Bash, as the user can change the binary delivered on the harddrive at any time?

GPL has all kinds of non-corporate friendly clauses. I wouldn't touch GPLv3 code in anything I ship either. Likewise Torvalds refuses to let GPLv3 touch the kernel.

Torvalds didn't put the "or any later version" clause in the Kernel's GPL license. And he hasn't required copyright assignments. Because of this, the kernel simply can't be converted to GPLv3. You would never be able to contact all the individual copyright holders and have them agree with complete consensus to re-licensing.

Re: About Python 3

#209
post #192

Earlier quoted context omitted.

You might be a great Microsoft developer. Use this API, no this one, nope now this one, you almost caught up, so we released a newer, more better one! Please buy Awesome Studio and RDMS 2015 or you are a loser. Here's a free version that can't do shit, the Pro version is only $2000, plus lots of your time adjusting to a newer mono/flat chrome development environment. Hot keys only for touch screen users!

I can give such examples for any commercial vendor and in terms of breaking compatibility, there are a few examples in FOSS land as well.

> I can give such examples for any commercial vendor and in terms of breaking compatibility, there are a few examples in FOSS land as well

But that wouldn't have the same emotional appeal as MS ;)

Post reply on HN