What’s up Python? JSFiddle for Python, f-objects, and new built-ins...
August, 2026
Summary #
- I just released Pystebin so you can share executable Python snippets in the web browser
- PEP 841 wants to allow
f{'a': 1}to create a frozen dict. - PEP 844 wants a
@publicdecorator to delimit the public API
Pystebin: executable Python snippets in the web browser #
What happens when pastebin.com and jsfiddle have a baby?
You type some Python code, you run it, right here, right there, without having to install anything.
Save it, share the link, and someone else can run it. Again, no install.
Pyodide is an amazing project, porting CPython to WASM so you can embed it in a Web page. Now, the whole thing is pretty heavy, 14Mb on average, so I wouldn’t use that as a substitute for JS. Not to mention it’s a lot slower than your regular snake. That’s why I don’t really believe in projects like pyscript.
However, for utilities and education, this is fantastic. I have been a big fan of basthon for example, to try things out in a notebook without having to install anything.
I wanted the same things for the blog: why just display the code, why not also let people execute it?
But since I didn’t know how well it would work in practice, I decided to do some experiments first.
So I started playing with the idea and the tech, and it took a life of its own with pystebin.
Since it’s in the browser, it can’t run Tkinter or make network calls, but otherwise, it's surprisingly complete:
There is a virtual file system, so you can use sqlite! Click here and run it yourself.
It also renders nice screenshots for social media:
Despite the mismatch between JS and Python maths, it can run all the maths as well. Try it.
It can also do all the binary shenanigans you expect.
And you can try each of those with Python 3.9 to 3.14.
Some fun things I would like to add one day:
- Multiple files and imports.
- External modules, with pip install.
- Actually being able to download an installer from that.
But for now, I’m just going to figure out the various bugs and blind spots. For example, I just noticed I don’t have a button to make a blank new paste... Cause I’m dumb.
After f-string, f-objects #
Ever felt like you needed a frozen set so quickly you couldn’t wait to type frozenset({})?
What do you mean you didn’t know there were frozen sets?
That’s why PEP 841 (Adding Frozen Syntax to Optimize Immutable Types) is so bizarre to my eyes. It suggests we should have a built-in syntax for writing immutable datatypes, like f{1, 2, 3} for frozen sets or f{'a': 1} for a frozen dict. After all, we have tuples, they are kinda frozen lists, right?
But to me that doesn’t make much sense:
- We don’t even have a built-in immutable dict yet, it’s for 3.15. You want a shortcut for something nobody uses yet?
- Those are data structures you rarely need in Python, where everything is mutable. I get why you want them, especially with free threading becoming more popular, but you can write a few characters more, no need for new syntax.
- The performance argument doesn’t work either, the Python interpreter has a JIT now. It takes care of those pesky function calls.
- Requiring a guarantee that it can’t be shadowed, unlike a built-in, displays a concern that is shared with... no one?
- It’s super confusing, especially if you are used to f-strings. And Python is in a delicate equilibrium of syntactic clarity vs brevity, wanting to be more productive, but not ending like Perl. To me this is perlish.
I really hope this doesn’t see the light of day.
PEP 844: public and private built-ins #
Last month we talked about __export__, and apparently the need for a better way to declare a public API is getting pressing, because here we got a second, different proposals. The idea of adding 2 new built-ins so you could do:
@public
class this_is_a_public_function:
...
@private
class ThisIsAPrivateClass:
...
public(THIS_IS_A_PUBLIC_CONSTANT=7)
This would populate __all__ with the public stuff, and prevent it from containing the private stuff.
It’s better than a manual __export__ but the variable declaration is super ugly, showing once more than not having a way to access the name of a variable in the current context is really limiting Python.
Plus, __all__ is just limiting import *, so I don’t see how it helps things at the runtime level. I like the explicitness of the documentation it gives you, though.
I do like that it’s being discussed, and I dig the decorator syntax. It could be used by doc generators, IDEs, shells, and it’s just nice to read something and see the author is telling you, without a doubt, “you have the right to use this”.
But we are not at the right amount of cool yet.
The moar section #
- There is currently a discussion to add a simple wrapper to run something in a thread. Basically
def run(func, *args, kwargs=None, name=None, daemon=None, context=None)which would create a thread with the params, start it, and return the handle. Why not? It can be handy in a shell. - Much more PyCon US 2026 are now available on youtube.
- Pypi has crossed 2 EXABYTES bandwidth served in 2026. If you’d take a turtle for each step between here and the moon, it would be completely unrelated to the topic at hand. But that’s a lot, ok?
- Mojo is becoming open source. It’s also not at all Python anymore, but I figured I’d share anyway.
uvcache is improving even more: they are now deduplicating at the file level, saving about 10% of the total cache size. Bloody mad men, all of them!
For the last point, they are hashing all the files and putting them in a central storage, which costs a 3 to 4% slowdown on cold installs and nothing on cached installs, which I’d say is reasonable. They also immediately offset this slowdown with another optimization, because that’s Astral for you.
Now how do they do it so fast? They use the wonderful blake3 hash function, which is basically a better, meaner, and above all, faster SHA. We only got blake 2 in the stdlib, which is significantly slower, but you can pip install this little baby for great results. If you need to compare a lot of crytographically secured unique values, 10/10, would recommend.