Posts tagged: thought

All posts with the tag "thought"

843 posts latest post 2026-04-15
Publishing rhythm
Apr 2026 | 17 posts

SQLModel models ship with an is_, and is_not that you can use to compare to None without pesky linters complaining.

This comment summed it up quite well.

I believe this is concerned entirely with SQLAlchemy, not with SQLModel, and has to do with the required semantics to construct a BinaryExpression object. Hero.age == None evaluates to a BinaryExpression object which is eventually used to construct the SQL query that the SQLAlchemy engine issues to your DBMS. Hero.age is None evaluates to False immediately, and not a BinaryExpression, which short-circuits the query no matter the value of age in a row. From a cursory search, it does not seem that the is operator can be overridden in Python. This could help explain why the only possibility is by using the == operator, which can be overridden.

so rather than using Team.heros == None we can use Team.seros.is_(None) which checks for itentity not equality.

Gridfinity generator uses open scad, so you can make rugged boxes, bins and base plates with form input. not fully custom fit to things, but you can custom size square bins, hole cut out sides and all. From what I can tell, no bento box either. so as long as what you are looking for is square this generator has you pretty well covered. I’m definitely using this for simple bins and rugged boxes.