logoalt Hacker News

What's New in Python 3.15

138 pointsby azhenleylast Wednesday at 7:52 PM53 commentsview on HN

Comments

pjmlptoday at 7:36 AM

I am here for the JIT and improved profiling goodies, one day Python will finally be a proper Lisp replacement.

-- https://www.norvig.com/python-lisp.html

show 3 replies
wdroztoday at 8:38 AM

In the improved error message [0] how are they able to tell nested attributes without having a big impact in performance? Or maybe this has a big impact on performance, then using exceptions for control flow is deprecated?

    ...
    print(container.area)
> AttributeError: 'Container' object has no attribute 'area'. Did you mean: 'inner.area'?

[0] -- https://docs.python.org/3.15/whatsnew/3.15.html#improved-err...

show 3 replies
PaulHoulelast Wednesday at 8:45 PM

PEP 686 makes me smile

https://peps.python.org/pep-0686/

show 1 reply
edflsafoiewqtoday at 6:45 AM

Can definitely think of some places I should use bytearray.take_bytes.

testdelacc1today at 11:18 AM

Worth mentioning that this is the documentation of 3.15 alpha 3. I feel like we’re better waiting for a release candidate or the final version before posting this page, in case there are any changes. Most people reading this are going to assume it’s final.

nemetroidtoday at 1:09 PM

The new profiling.sampling module looks very neat, but I don't see any way to enable/disable the profiler from code. This greatly limits the usefulness, as I am often in control of the code itself but not how it is launched.

ruudatoday at 7:56 AM

> Python now uses UTF-8 as the default encoding, independent of the system’s environment.

Nice, not specifying the encoding is one of the most common issues I need to point out in code reviews.

show 3 replies
vb-8448today at 11:05 AM

what about making python 5x faster(faster-cpython project)?

show 1 reply
stabblestoday at 8:38 AM

> On POSIX platforms, platlib directories will be created if needed when creating virtual environments, instead of using lib64 -> lib symlink. This means purelib and platlib of virtual environments no longer share the same lib directory on platforms where sys.platlibdir is not equal to lib.

Sigh. Why can't they just be the same in virtual environments. Who cares about lib64 in a venv? Just another useless search path.

ameliustoday at 11:25 AM

Cool, now I just have to wait until my dependencies support this version.

show 1 reply
Erenay09today at 7:41 AM

Seeing this reminded me of version 3.14, where π is an infinity expressed through its fractional parts.