Live data from Hacker News

Python 3.12

python.org

71–80 of 344 posts

Re: Python 3.12

#71
post #21

Earlier quoted context omitted.

I despise random politics injections as well, but this is rather tame and very much in line with the ironic spirit of how Python release notes are written. I don't think it's offensive to anybody who doesn't go out of their way to become offended by things.

Would you feel the same way if it were a cutesy poem supporting an opposing view?

Both-sides-ism is not some kind of "free points" move in an argument. It's entirely consistent to believe (a) that a "tame" political statement supporting immigrants is acceptable in release notes, while also believing (b) that a cutesy poem defaming immigrants would be abhorrent and unacceptable. No one has an obligation to think that all political messages are acceptable just because they think that some political messages are sometimes acceptable.

Just to take an extreme example, imagine someone put in a note expressing empathy for the families of the victims of a natural disaster in their release notes. The following conversation takes place on Hacker News:

A: I don't really think these sorts of statements have a place in release notes. They don't ultimately accomplish anything or help anyone.

B: I think there's no problem with expressing compassion like this. It's not particularly obtrusive and isn't harming anyone.

You: How would you feel if the release notes had expressed glee at the disaster instead? You would oppose that, right? That means you must also oppose empathetic messages in release notes, to be consistent.

Or to sum up this whole thing in a dril Tweet: https://twitter.com/dril/status/473265809079693312

Re: Python 3.12

#72
post #66
post #49

Earlier quoted context omitted.

Since it currently lacks any way to transfer objects between interpreters other than pickling, does it offer any advantage over the multiprocessing module?

Not for pure python code; but there's massive advantages for mixed C(++) and Python: I can now have multiple sub interpreters running concurrently and accessing the same shared state in a thread-safe C++ library. Previously this required rewriting the whole C++ library to support either pickling (multiplying the total memory consumption by the number of cores), or support allocating everything in shared memory (which…

Wouldn't you also gain some overhead reduction too? Multiprocessing will have more overhead for spawning new processes vs signle process that will contain the sup-interprets? or I am missing something?

At least in theory this what would happen.

Re: Python 3.12

#73
post #48

Earlier quoted context omitted.

I don't think political advocacy belongs in an announcement of a Python version.

I don't think this is a political advocacy. It's just a personal expression about a social issue. I found the way it was written quite thoughtful, actually, which I respect (though I don't like in its entirety). But I upvoted your comment because I don't think there's a reason for people to downvote your comment. It's absolutely acceptable that someone dislikes the poem and wants to express it here. People confuse th…

If an upvote is for agreement, does downvoting for disagreement not make sense? Or are upvotes meant for something else?

Re: Python 3.12

#74
Ooh, seems there is a new syntax for declaring the types of kwargs [1]:

  from typing import TypedDict, Unpack
  
  class Movie(TypedDict):
    name: str
    year: int

  def foo(*kwargs: Unpack[Movie]): ...
Maybe now I'll be able to actually figure out what data to send libraries without actually reading their source code.

1. https://docs.python.org/3.12/whatsnew/3.12.html#pep-692-usin...

Re: Python 3.12

#75

Earlier quoted context omitted.

What are the advantage of Cython over something like C++ with pybind11 or whatever the equivalent in Rustland?

Cython is similar to python and is fairly easy to write for a python user, while C++ or Rust have much larger learning curves.

However if one is using C++/Rust anyways, then it's a good idea to stay away from Cython. From afar, Cython seems like a viable solution for Python/C++ interop. But the details get messy: you need to clone the .h headers into .pxd Cython-readable headers; and more advanced template-magic C++ constructs may end up being not directly usable in Cython due to missing features or bugs in the C++ support.

In the end, we ended up with quite a number of layers wrapping each other:

  1. actual C++ implementation
  2. actual C++ header
  3. C++ wrapper implementation, avoiding constructs that Cython doesn't support
  4. C++ wrapper header
  5. Cython .pxd for step 4
  6. Cython .pyx exposing `cdef class`es to Python with a nice Python-style API for the original C++ library.
  7. Hand-written .pyi for type checking the remaining Python code, because Cython doesn't have support for auto-generating these yet.
Had we used pybind11 / nanobind instead, we could have stopped at step 3. Cython started easy, but ended up being a major maintenance burden.

Re: Python 3.12

#76
post #71

Earlier quoted context omitted.

Would you feel the same way if it were a cutesy poem supporting an opposing view?

Both-sides-ism is not some kind of "free points" move in an argument. It's entirely consistent to believe (a) that a "tame" political statement supporting immigrants is acceptable in release notes, while also believing (b) that a cutesy poem defaming immigrants would be abhorrent and unacceptable. No one has an obligation to think that all political messages are acceptable just because they think that some political…

I think you've missed the entire point of the structure of the poem - the backward reading (ie, immigrants may share my home and food) is as "tame" as the forward reading.

>That means you must also oppose empathetic messages in release notes, to be consistent.

Yes. It will be interesting reading these cultural artifacts after 50 further years of geo-political development.

Re: Python 3.12

#78

Earlier quoted context omitted.

For people who downvote Bostonian for his comment, how would you like it if that announcement, say, contained an abortion-related proclamation that you don't agree with? "Share our food, Share our homes and Share our countries" is quite a big demand on everyone else. I am certainly not willing to do so without limit and without regard to context (e.g. the Muslim gang war that flared up in Sweden).

Fortunately you can read it either forwards or backwards to support your views.

As if these two views were the only views available...

Re: Python 3.12

#79

Earlier quoted context omitted.

For people who downvote Bostonian for his comment, how would you like it if that announcement, say, contained an abortion-related proclamation that you don't agree with? "Share our food, Share our homes and Share our countries" is quite a big demand on everyone else. I am certainly not willing to do so without limit and without regard to context (e.g. the Muslim gang war that flared up in Sweden).

Fortunately you can read it either forwards or backwards to support your views.

IMHO there is nothing "fortunate" about dragging politics into programming, regardless of your or mine views.

I would find it fortunate and valuable if at least certain human activites stayed out of political culture wars entirely. If, instead of "my side, your side", there simply wasn't any need to think of a side for a moment.

I already deleted my FB and TW account to get rid of incessant political flamewars and I feel aghast that they are now following me to Python release notes of all places.

Re: Python 3.12

#80
The f-string nesting feature is nice. After having that sort of arbitrary interpolation in C# it always annoyed me that something as dynamic as Python couldn't figure it out.
Post reply on HN