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'?
I had a colleague who was hostile to any language other than common lisp. Except python, which I assume is just because this page exists. What if norvig woke up that day and decided to write about Ruby instead?
> 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.
You mean the coding= comment? Where are you shipping your code that that was actually a problem? I've never been on a project where we did that, let alone needed it.
encode()/decode() have used UTF-8 as the default since Python 3.2 (soon, 15 years ago). This is about the default encoding for e.g. the "encoding" parameter of open().
[0] -- https://docs.python.org/3.15/whatsnew/3.15.html#improved-err...
https://peps.python.org/pep-0686/
-- https://www.norvig.com/python-lisp.html
Sigh. Why can't they just be the same in virtual environments. Who cares about lib64 in a venv? Just another useless search path.
Nice, not specifying the encoding is one of the most common issues I need to point out in code reviews.