Thank god for type aliases
Python 3.12
31–40 of 344 posts
Re: Python 3.12
#32What's new: https://docs.python.org/dev/whatsnew/3.12.html Summary, sorry for poor formatting, I'm not sure HN can do a list of any kind? New features More flexible f-string parsing, allowing many things previously disallowed (PEP 701). Support for the buffer protocol in Python code (PEP 688). A new debugging/profiling API (PEP 669). Support for isolated subinterpreters with separate Global Interpreter Locks (PEP 684…
What are the advantage of Cython over something like C++ with pybind11 or whatever the equivalent in Rustland?
Re: Python 3.12
#33oh 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
#34Holy shit, actual multithreading. Never thought I'd see the day, good on the Python team for making such great improvements.
Re: Python 3.12
#35As 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
#36Re: Python 3.12
#37Earlier quoted context omitted.
I don't think political advocacy belongs in an announcement of a Python version.
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.
Re: Python 3.12
#38Holy shit, actual multithreading. Never thought I'd see the day, good on the Python team for making such great improvements.
The features of Per-Interpreter GIL are - for now - only available using C-API, so there's no direct interface for Python developers. Such interface is expected to come with PEP 554, which - if accepted - is supposed to land in Python 3.13, until then we will have to hack our way to the sub-interpreter implementation.
Re: Python 3.12
#39Everything 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.
"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).
Re: Python 3.12
#40Wonder if it could be used to add lazy evaluation to other libraries, like numpy?