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...
Can definitely think of some places I should use bytearray.take_bytes.
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.
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.
> 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.
what about making python 5x faster(faster-cpython project)?
> 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.
Cool, now I just have to wait until my dependencies support this version.
Seeing this reminded me of version 3.14, where π is an infinity expressed through its fractional parts.
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