
Discover why 'if not mylist' is twice as fast as 'len(mylist) == 0' by examining CPython's VM instructions and object memory access patterns.

Backend (and sometimes frontend) software engineer working on sports data at Elias Sports Bureau.
Experience with: Python, Django, Typescript/JS, infrastructure, databases
Find me:
Discover why 'if not mylist' is twice as fast as 'len(mylist) == 0' by examining CPython's VM instructions and object memory access patterns.
In this article, we show how to leverage the tabulate Python module, so we can print good-looking querysets in our Django shell.
Django 5.2 was released last Wednesday, another exciting step forward for our favourite web framework. It comes with a composite of new features, contributed to by many, some of which I am happy to have helped with. Below is my pick of highlights from the release notes.
Safely squash Django migrations in long-running projects to optimize performance and maintain migration history integrity using django-model-info
Can we have fast moving experiments in core?
Let me know if you have things to add!
Python-related happenings for the week of 14 October 2024
pyparsing
3.2.0 - via https://fosstodon.org/@ptmcg/113302603878074247 eve
2.2 - via https://fosstodon.org/@nicola/113310333550705121 pillow
11.0.0 - via https://mastodon.social/@hugovk/113312137194438039 (and https://fosstodon.org/@pillow/113312110767354794) validate-pyproject
0.21 - via https://fosstodon.org/@henryiii/113312246938821428 Replace pyenv
with uv
- Franck Pommereau - Blog
Learn practical SQL & PostgreSQL techniques. Build rock-solid data systems with 'boring' database solutions that deliver reliability without the drama.
Crap, now I need to know about competitive Jenga ...
This is a plain language guide to every built-in function in Python, paired with a simple example that shows each function in action.
A prototype for a possibly more aligned authentication system
Adding a Primary Key To An Existing Table
unit8co/darts: A python library for user-friendly forecasting and anomaly detection on time series.
A python library for user-friendly forecasting and anomaly detection on time series. - unit8co/darts
Hey Ulrik, apologies for not responding sooner.
I'm more than happy to talk about adding one (or more!) mods for any of the communities I mod for right now, including c/python. I have at least one person in mind, who has been pretty active both in c/python and c/django. I'd also like to talk more about mod expectations, particularly with regard to reported posts/comments.
That's the way I read the proposal, which I definitely like.
They changed the licensing: https://redis.com/blog/redis-adopts-dual-source-available-licensing/
I haven't had a chance to look yet, but I'm using a pretty similar stack at, although with React instead of Nuxt/Vue. I definitely love using Docker, at least as a dev platform, because of the way it evens the field across OS's and makes it easy to onboard new contributors. Will definitely take a closer look when I get more time.
Buuut ... I do mod the !django@programming.dev community, which you might be interested in checking out. There's also the !docker@programming.dev, which is also worth checking out.
Reading the docs and I'm a little disappointed to see that disabling telemetry is opt-in: https://bruin-data.github.io/ingestr/getting-started/telemetry.html#disabling-telemetry.
Thanks, I appreciate the reply and openness to doing things besides just video.
Do you have a written version?
I really dislike having to watch an entire video to catch the one bit of useful information. I wish I had the time to watch entire videos, but honestly, I don't. On top of that, my brain has often wandered off well before I get to the interesting bit.
Love it. Thanks for the improvement!
There's a brake pedal, but it's almost never needed (and if it is, it's always been because of me being stupid). Releasing the accelerator engages the regenerative breaking, up to and including coming to a stop. I love it and don't ever want to go back.
Having said that, I have had zero problem adapting back to normal breaking in my wife's car (ICE) when I need to drive it for some reason.
I really don't understand people that complain about the 1-pedal driving.
Looking at the docs, it looks like it's an instance of ID3Tags
, which appears to be based on couple of helper classes mutagen._util.DictProxy
and mutagen._tags.Tags
, where DictProxy
(and its base DictMixin
) provides the dict-like interface. Underneath that, it looks like it's storing the actual values in a simple dict
(DictProxy.__dict
) and proxying to that.
I'm not seeing anything obvious that would muck with the incoming lookup key anywhere in ID3Tags
or DictProxy.__getitem__
or any of the other base classes.
I have to jump off to pack for a trip, but might try this out later in a live shell session to see if there's something odd going on with the API.
In the meantime, OP, are you positive you were looking at the same file each time? Was this in a script or in a live Python shell session?
Anecdata here in the US, but my local mom and pop pharmacy (which I love) currently would lose $200/mo on my vyvanse because of my insurance and the whole generic vyvanse nonsense. This system sucks.
For the time being, I fill my vyvanse at Walgreens and hope they're losing $200/mo on it. I fill everything else at the mom and pop, until they let me know the situation is better.
!dfw@lemmy.world is probably a good place to start.
The way they lost this one was brutal.
Aaaaaand I'm cleaning the garage this week ...