Live data from Hacker News

Python 3.12

python.org

11–20 of 344 posts

Re: Python 3.12

#13
oh cool, multi-line f-strings. With inline comments!

    f"This is the playlist: {", ".join([
        'Take me back to Eden',  # My, my, those eyes like fire
        'Alkaline',              # Not acid nor alkaline
        'Ascensionism'           # Take to the broken skies at last
    ])}"

Re: Python 3.12

#14
post #4

I think the support for isolated sub-interpreters with separate Global Interpreter Locks is the most interesting new feature in python. It is doubtful not the best way to offer some sort of concurrency but still a step closer to maybe one day get rid of GILs.

Well, that's where the whole "for Workgroups" part comes in I suppose. See my sibling comment.

Re: Python 3.12

#16
post #4

I think the support for isolated sub-interpreters with separate Global Interpreter Locks is the most interesting new feature in python. It is doubtful not the best way to offer some sort of concurrency but still a step closer to maybe one day get rid of GILs.

Too bad there's no Python API available yet :(

It's scheduled to be delivered next year if I'm not mistaken.

The new syntax for generic types is also a very nice QOL improvement, you can now just do:

  class MyList[T]:
      ...

Re: Python 3.12

#17
post #5

Everything aside, I enjoyed the "And now for something completely different" part.

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

I don't think it's your authority to say what should or shouldn't belong in a release you have no contribution to!

Re: Python 3.12

#18
As now f-strings can contain any valid Python expression inside expression components, it is now possible to nest f-strings arbitrarily:

>>> f"{f"{f"{f"{f"{f"{1+1}"}"}"}"}"}"

'2'

Is anyone aware of the change to the interpreter that allows for this?

Re: Python 3.12

#20
post #17

Earlier quoted context omitted.

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

I don't think it's your authority to say what should or shouldn't belong in a release you have no contribution to!

People are allowed to think things, and say what they think. Just as you did.
Post reply on HN