Sitemap
Pythonic AF

Join our smart community of Python developers! This is your no-BS guide to mastering Python, deep dives, hot takes, clean code, dirty bugs, and everything in between. From automation to APIs, web apps to AI, we cover real world tips, performance tricks, and more.

Member-only story

Finally, Python 3.15 Is Here. A Bigger Update Than I Expected

3 min readOct 19, 2026

--

I like small Python improvements. Being able to flatten a list like this is enough to get my attention

batches = [[1, 2], [3, 4]]
items = [*batch for batch in batches]

Python 3.15 adds unpacking inside comprehensions. The longer version worked perfectly well. I just like having this option.

But lazy imports and frozen dictionaries are the changes I’m more interested in.

Read the full story for free here on Medium

Press enter or click to view image in full size
Canva

Lazy imports, with a catch

I like opening a file and seeing its dependencies at the top. Moving expensive imports into functions helps with startup time, but it scatters those declarations around.

Now we can write

lazy import pandas as pd

The module loads when the imported name is first used. If a particular command never needs pandas, it can avoid that loading cost.

There’s a trade off. Import errors also arrive later. So do any side effects from executing…

--

--

Aysha R
Aysha R

Written by Aysha R

Python Queen 👑 | 9 years | Solving complex problems, optimizing performance & sharing knowledge | Writer | Coffee, coding & creating every day!

Pythonic AF
Pythonic AF

Published in Pythonic AF

Join our smart community of Python developers! This is your no-BS guide to mastering Python, deep dives, hot takes, clean code, dirty bugs, and everything in between. From automation to APIs, web apps to AI, we cover real world tips, performance tricks, and more.