Baptiste Mispelon

@bmispelon
366 Followers
231 Following
826 Posts

💩🔥💻

Django server boy

#Django #Python

Bloghttps://blog.bmispelon.rocks/
Pronouns🇬🇧 He/him 🇫🇷 Il 🇳🇴 Han
GitHubhttps://github.com/bmispelon/
@treyhunner Tagging you on this since it might qualify as a #Pythonoddity

Can someone explain this #Python import behavior?
I'm in a directory with 3 files:

a.py contains `A = 1; from b import *`
b.py contains `from a import *; A += 1`
c.py contains `from a import A; print(A)`

Can you guess and explain what happens when you run `python c.py`?

ImportError
21%
RecursionError
6.7%
Prints 1
34.3%
Prints 2
38.1%
Poll ended at .

https://maxhalford.github.io/blog/text-classification-zstd/

This is a cool blog post about using compression.zstd in Python as a surprisingly effective (and fast!) simple text classifier.

Text classification with Python 3.14's zstd module

Python 3.14 introduced the compression.zstd module. It is a standard library implementation of Facebook’s Zstandard (Zstd) compression algorithm. It was developed a decade ago by Yann Collet, who holds a blog devoted to compression algorithms. I am not a compression expert, but Zstd caught my eye because it supports incremental compression. You can feed it data to compress in chunks, and it will maintain an internal state. It’s particularly well suited for compressing small data. It’s perfect for the classify text via compression trick, which I described in a previous blog post 5 years ago.

Max Halford

RE: https://hachyderm.io/@itworldcup/115960578331633434

Less than half an hour left and Rust is leading by just 4 votes!!!

Vote #Python and boost!

#VotePythonForITWorldCup

I've just released part three of my Quirks of Django's template language blog series:

https://blog.lilyf.org/posts/django-template-quirks-3/

#django #DjangoTemplates

Quirks in Django's template language part 3

Django Rusty Templates Since September 2024, I (and some collaborators) have been building a reimplementation of Django’s templating language in Rust, called Django Rusty Templates. During this process, we have discovered several weird edge-cases and bugs, some of which I’ve talked about before (Part 1, Part 2). The {% now %} tag The {% now %} tag is provided by Django to display the current date or time. It uses a format specifier language designed for compatibility with PHP, which feels like an odd decision in retrospect, since most Python programmers are used to the strftime style formatting provided by the Python datetime module.

Lily's Blog

RE: https://hachyderm.io/@itworldcup/115926604229775228

PHP is currently winning 51% to 49% against #Python with only 6 votes needed to swing it!

But it'll be a tough 10 hours so vote and boost!

#VotePythonForITWorldCup

What if I told you that the following way of taking the second object from a Django `QuerySet` might be unreliable and can lead to non-deterministic failures under some circumstances?

And if you think it's a bad idea whatsoever - can you explain why?

Take a look on my recent blog post for more details: https://borutzki.github.io/2026/01/19/why-using-n-on-a-django-queryset-can-be-unsafe.html

#Django #Python #DailyPythonista #programming #ORM

I think the cult of the former #python BDFL has gone too far.

The palm tree that lead to Palmyra: https://alexwlchan.net/2025/palmyrene-alphabet/?ref=mastodon

I wrote a bit about a historical alphabet I’d never heard of, which I found while looking for the 🌴 emoji.

The palm tree that lead to Palmyra

Palmyrene is an alphabet that was used to write Aramaic in 300–100 BCE, and I learnt about it while looking for a palm tree emoji.

Digital Signage Federation Announces Newly Elected Board Members for 2025 - Digital Signage Federation