social.dk-libre.fr is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.

This server runs the snac software and there is no automatic sign-up process.

Search results for tag #python

[?]David Lord :python: » 🌐
@davidism@mas.to

Added docs/comments near places that are magnets for invalid (AI generated) security reports in Werkzeug. Maybe those tools will read these docs when scanning the code and will produce output that says it's not a security issue? Maybe? At least we can point to it next time if not.
github.com/pallets/werkzeug/pu

    [?]Pffff... » 🌐
    @1HommeAzerty@mamot.fr

    Je vous raconte, c'est tordu.

    J'exécute subprocess.Popen(["ipython", "kernel", f"-f={cfg}"]) pour lancer un kernel et m'y connecter plus tard.

    Si cfg est un chemin relatif (genre "./toto"), rien à signaler. Mais si cfg est un chemin absolu (genre "/home/azerty/foo/toto"), alors mon son parent ("foo") reçoit le bit t. C'est n'importe quoi...

    Pour arranger les choses, les dev de ont limité la soumission de bugs aux devs du projet. Bah on va vivre avec ça du coup...

      AodeRelay boosted

      [?]Trey Hunner 🐍 » 🌐
      @treyhunner@mastodon.social

      LWN covered my talk on pathlib from !

      If you're using and not using the pathlib module, check it out. I think that it's one of the most underused modules in the Python standard library.

      lwn.net/SubscriberLink/1088781

        [?]Djangonaut Space » 🌐
        @djangonaut@indieweb.social

        Join the Djangonaut Space Session7 to grow as a contributor in the and ecosystem with the support of community and mentors.

        Applications are open until September 6th AoE.

        Read our blog post to find out how the program works:
        djangonaut.space/comms/2026/08

        Projects involved in Session 7:

        🐝 @beeware docs
        🟢 @django & accessibility
        💚 @djangocms
        🐛 django-debug-toolbar
        🧡 @djangogirls
        ⚙️ Render Engine

        Projects related to Django and Python, including Django Debug Toolbar, Django Girls+, BeeWarem Django, djangoCMS and Render Engine involved in the Djangonaut Space program.

        Alt...Projects related to Django and Python, including Django Debug Toolbar, Django Girls+, BeeWarem Django, djangoCMS and Render Engine involved in the Djangonaut Space program.

          [?]Pffff... » 🌐
          @1HommeAzerty@mamot.fr

          Je vous raconte, c'est tordu.

          J'exécute subprocess.Popen(["ipython", "kernel", f"-f={cfg}"]) pour lancer un kernel et m'y connecter plus tard.

          Si cfg est un chemin relatif (genre "./toto"), rien à signaler. Mais si cfg est un chemin absolu (genre "/home/azerty/foo/toto"), alors mon son parent ("foo") reçoit le bit t. C'est n'importe quoi...

          Pour arranger les choses, les dev de ont limité la soumission de bugs aux devs du projet. Bah on va vivre avec ça du coup...

            AodeRelay boosted

            [?]Mike Coats 🏴󠁧󠁢󠁳󠁣󠁴󠁿🇪🇺🌍♻️ » 🌐
            @mike@mikecoats.social

            My latest blog post: Extending CircuitPython with Native Modules - Part 3

            mikecoats.com/extending-circui

            For CircuitPython Day 2026, I wanted to get close to the metal and write a module in C that I could call from CircuitPython. Finally, we bundle everything inside a class.

              [?]Python Software Foundation » 🌐
              @ThePSF@fosstodon.org

              ¡Para la próxima semana el grupo de trabajo de Diversidad e Inclusión de PSF tendrá un espacio en el Discord de la PSF!

              Únete el August 25 9 PM UTC en el canal -diversity para charlar, hacer preguntas y compartir en qué estás trabajando 🐍🗺️

              pyfound.blogspot.com/2026/07/t

                [?]Python Software Foundation » 🌐
                @ThePSF@fosstodon.org

                The PSF Diversity & Inclusion Workgroup monthly office hours are next week on the PSF Discord!

                Join us August 25 9 PM UTC in -diversity to chat, ask questions, and share what you're working on 🐍🗺️


                pyfound.blogspot.com/2026/07/t

                  Fabio Natali boosted

                  [?]Thayer » 🌐
                  @Thayer@mastodon.social

                  UK based only - Senior Developer for The Electoral Commission // £70,000 // fully remote possible, hybrid at UK hubs also fine if your preference.

                  Fancy working with interesting data problems, and services that need to scale to millions of voters? You'll help bring a major voter-information service in-house and shape what comes next.

                  YOUR COUNTRY NEEDS YOU! We all need you. Plz.

                  Interested? I'm sole recruiter for this > thayer@team-prime.com CVs pls!

                    [?]Graham Dumpleton » 🌐
                    @grahamdumpleton@mastodon.social

                    I built a new thing, an idea I have wanted to try for a long time.

                    Since writing wrapt, the idea was to build on it for two jobs I saw as one: unit testing in the spirit of mock, and tracing execution across real code. Same bindings for both, no changes to the code being observed. wrapture is the answer I ended up with.

                    First alpha on PyPI. Curious what people make of it.

                    github.com/GrahamDumpleton/wra

                      [?]LWN.net » 🌐
                      @lwn@fedi.lwn.net

                      [$] Representing Python paths using pathlib

                      At the outset of his PyCon US 2026 talk, Trey Hunner said that his goal was for attendees to stop representing filesystem paths as strings and to use pathlib instead. That's kind [...]

                      lwn.net/Articles/1088781/

                        [?]you're all idiots » 🌐
                        @idiot@mastodonapp.uk

                        @lwn then make it possible for paths to represent directories.

                          [?]Trey Hunner 🐍 » 🌐
                          @treyhunner@mastodon.social

                          Python Tip #232 (of 365):

                          Try to avoid static methods in Python.

                          A static method is a function that HAPPENS to live on a class. It doesn't know the instance (or class) it's called on.

                          They're usually helper functions that live on a class for organizational reasons:

                          class Hasher:
                          ...
                          @staticmethod
                          def _checksum_matches(hash_object, checksum):
                          checksum_bytes = bytes.fromhex(checksum)
                          return checksum_bytes == hash_object.digest()

                          🧵 (1/3)

                            Pffff... boosted

                            [?]David Lord :python: » 🌐
                            @davidism@mas.to

                            Should we remove Flask's interactive debugger? (Being able to execute code at any frame in a traceback.) It's a huge amount of complexity and source of constant invalid security reports. I'm not sure it's been needed for a long time. github.com/pallets/werkzeug/is

                              Hachiko boosted

                              [?]Milka64 » 🌐
                              @milka64@mastodon.social

                              Nouvelle instance (comment ça 10 jours ?), nouvelle intro !
                              Admin sys Linux/BSD et adepte du logiciel libre.
                              Je bricole et, code en Python
                              je parle parfois de science.
                              Je préfère l’intelligence artisanale à l’intelligence artificielle.
                              Héberger ses données plutôt que de les offrir aux GAFAM.
                              Team et je m'interresse aux

                                [?]Juhis » 🌐
                                @hamatti@mastodon.world

                                r is for REPL

                                Python's REPL (read-eval-print loop) is an interactive playground for writing and executing Python code and one of the big reasons why I likely ended up enjoying Python more than other languages when I was learning programming.

                                It has so many uses: buidling your code step by step, running interactive shell script style operations, exploring Django's models and debugging.

                                hamatti.org/posts/r-is-for-rep

                                  [?]Hugo van Kemenade » 🌐
                                  @hugovk@mastodon.social

                                  RE: mastodon.world/@hamatti/117127

                                  Some neat startup script tips in here, and for Python 3.15 you could do this for nicer pprint output:

                                  pp = Printer(expand=True, indent=4)

                                  [?]Juhis » 🌐
                                  @hamatti@mastodon.world

                                  r is for REPL

                                  Python's REPL (read-eval-print loop) is an interactive playground for writing and executing Python code and one of the big reasons why I likely ended up enjoying Python more than other languages when I was learning programming.

                                  It has so many uses: buidling your code step by step, running interactive shell script style operations, exploring Django's models and debugging.

                                  hamatti.org/posts/r-is-for-rep

                                      AodeRelay boosted

                                      [?]Mike Coats 🏴󠁧󠁢󠁳󠁣󠁴󠁿🇪🇺🌍♻️ » 🌐
                                      @mike@mikecoats.social

                                      My latest blog post: Extending CircuitPython with Native Modules - Part 2

                                      mikecoats.com/extending-circui

                                      For CircuitPython Day 2026, I wanted to get close to the metal and write a module in C that I could call from CircuitPython. This time, we're looking at adding a module-level method.

                                        [?]DjangoCon US :django: :python: » 🤖 🌐
                                        @djangocon@fosstodon.org

                                        Looking to get active during DjangoCon US?

                                        We've put together a guide with ideas for walking, running, biking, swimming, and exploring Chicago during the conference.

                                        2026.djangocon.us/news/get-act

                                          [?]Mariatta 🤦🏻‍♀️ :python: » 🌐
                                          @mariatta@fosstodon.org

                                          Does your local meetup community need a website? Because I have just the theme for you.

                                          Every community I've helped run has needed a website, and every time, we'd spent time hours browsing for themes and ended up rebuilding it from scratch, because none of the themes are meant for communities. Until now.

                                          Introducing "Popular", a static site theme built especially for community & meetup groups, works in Hugo & Astro.

                                          Blog: mariatta.ca/posts/no-more-rebu

                                            [?]Trey Hunner 🐍 » 🌐
                                            @treyhunner@mastodon.social

                                            Python Tip #231 (of 365):

                                            Use class methods as alternate constructors.

                                            >>> s = Square.from_area(100)
                                            >>> s.length
                                            10.0

                                            The classmethod decorator makes a method that's meant to be called on the class itself (not on an instance):

                                            import math

                                            class Square:
                                            def __init__(self, length, color=None):
                                            self.length = length
                                            self.color = color
                                            @classmethod
                                            def from_area(cls, area, color=None):
                                            return cls(math.sqrt(area), color)

                                            🧵 (1/4)

                                              [?]Glyph » 🌐
                                              @glyph@mastodon.social

                                              We could really use some help with Twisted's and implementation. Could you DM if these terms of are of interest to you and if you have any spare capacity to review a little bit of code? It would be much appreciated.

                                                [?]Trey Hunner 🐍 » 🌐
                                                @treyhunner@mastodon.social

                                                “You can think of abstract base classes that rely on registering as similar to an opt-in duck.”

                                                Read more 👉 pym.dev/goose-typing/

                                                  James C boosted

                                                  [?]Yann Büchau :nixos: » 🌐
                                                  @nobodyinperson@fosstodon.org

                                                  Holy cow, remember to clean your cache from time to time, folks 😅

                                                  UPDATE: Seems to contain some links, deleting the cache only freed like 9GiB, but still...

                                                  /home/yann/.cache/uv/
27,6 GiB
505.110 Dateien (15 %)

                                                  Alt.../home/yann/.cache/uv/ 27,6 GiB 505.110 Dateien (15 %)

                                                    [?]anarcat » 🌐
                                                    @Anarcat@kolektiva.social

                                                    [?]Trey Hunner 🐍 » 🌐
                                                    @treyhunner@mastodon.social

                                                    The Python Morsels REPL now runs on the new pyrepl! In browsers that don't support JSPI.

                                                    pym.dev/repl

                                                    As of very recently, both Chrome and Firefox support the JavaScript Promise Interface, which is what's needed to get pyrepl (the new REPL in Python 3.13+) to work in WebAssembly.

                                                    it falls back to the old REPL.

                                                    Thanks to @ambv & whoever else helped (can't seem to find the PR) with getting pyrepl working in the browser!

                                                      [?]Hugo van Kemenade » 🌐
                                                      @hugovk@mastodon.social

                                                      [?]Fitheach » 🌐
                                                      @fitheach@mstdn.io

                                                      In general, I prefer reStructuredText to other markups, because I find it more capable, for my needs.

                                                      The one exception to this is Tables. Whoever designed the rst syntax for tables should be taken around the back of the building, and shot.

                                                      I've just spent over an hour fiddling with -, =, and + to get my tables to work in 3 documents.

                                                        [?]Python Software Foundation » 🌐
                                                        @ThePSF@fosstodon.org

                                                        runs on ~zero AWS cost thanks to @fastlydevs caching 99% of traffic + AWS credits covering the rest. Huge thanks to both! But 2026 broke an 8-year streak: AWS spend is up 69% YoY as agents & CI runs surge.

                                                        @Monorepo, PSF Director of Engineering, on what's changing: pyfound.blogspot.com/2026/08/h

                                                          Lily boosted

                                                          [?]rixx » 🌐
                                                          @rixx@chaos.social

                                                          Gunicorn now categorises "Framework returns content on HEAD requests" as a bug, and warns about it for every request.

                                                          Django's position is "Web servers should automatically strip the content of responses to HEAD requests while leaving the headers unchanged".

                                                          So, that's fun! 🫠
                                                          (Screenshot shows ASGI commit, but it was added to WSGI too.)

                                                          Django docs screenshot, highlight reads "Web servers should automatically strip the content of responses to HEAD requests while leaving the headers unchanged"

                                                          Alt...Django docs screenshot, highlight reads "Web servers should automatically strip the content of responses to HEAD requests while leaving the headers unchanged"

                                                          gunicorn commit, message: fix: warn once when ASGI app emits a body for a no-body response
A framework bug — say, returning bytes from a HEAD or 204 handler — is
now logged at WARNING level the first time it happens for a request
so the misbehavior is visible without spamming on multi-chunk streams.

                                                          Alt...gunicorn commit, message: fix: warn once when ASGI app emits a body for a no-body response A framework bug — say, returning bytes from a HEAD or 204 handler — is now logged at WARNING level the first time it happens for a request so the misbehavior is visible without spamming on multi-chunk streams.

                                                            [?]Juhis » 🌐
                                                            @hamatti@mastodon.world

                                                            q is for Q

                                                            Django's Q objects make more complex queries easier to read and they can improve reusability and documentation of your code by giving individual queries and query parts names.

                                                            hamatti.org/posts/q-is-for-q-p

                                                              [?]Trey Hunner 🐍 » 🌐
                                                              @treyhunner@mastodon.social

                                                              Python Tip #230 (of 365):

                                                              Use a single underscore prefix for internal attributes.

                                                              This _digits attribute is private... but only by convention:

                                                              import re

                                                              class PhoneNumber:
                                                              def __init__(self, number):
                                                              self._digits = re.sub(r"\D", "", number)
                                                              ...

                                                              This (not fully implemented) class includes str() and an area_code attribute as its public interface:

                                                              >>> wh = PhoneNumber("(202) 456-1414")
                                                              >>> print(wh)
                                                              202-456-1414
                                                              >>> wh.area_code
                                                              '202'

                                                              🧵 (1/3)

                                                                [?]Seth Larson » 🌐
                                                                @sethmlarson@mastodon.social

                                                                A neat security vulnerability in Python caused by str.lower(). Also includes lots of RFCs so I’m having a good time :)

                                                                sethmlarson.dev/when-str-lower

                                                                  [?]Adam Johnson :django: :python: » 🌐
                                                                  @adamchainz@fosstodon.org

                                                                  ✍️ I used my leet prompt engineering skillz to fix a bunch of bugs in django-upgrade

                                                                  adamj.eu/tech/2026/08/18/djang

                                                                    [?]Luyin [https://pronouns.page/u/luyin] » 🌐
                                                                    @luyin@lgbtqia.space

                                                                    Alright Fedi, I'm looking for a job out of AI hell. I know chances aren't great for anyone right now, but I'm taking mine anyway.

                                                                    I'm a (senior?) developer with 10 years of experience in both and (with a preference for the latter). I can find my way around and don't shy away from . I've done a bit of lately and haven't found it terrible.

                                                                    I thrive in team environments where I have time both to work on my own and in pairs or mobs ( mob.sh is a great tool I'd use again, but IntelliJ's Code With Me works too).

                                                                    My greatest passion is automating the tasks around coding away - testing, building, deploying code with either the shortest set of commands or just fully automated from a pipeline on pull/merge requests.

                                                                    I won't say no to places that require me to use AI, but I have a strong preference to be able to write my code myself.

                                                                    Would love boosts for reach! Also thanks for reading 💖

                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                      @treyhunner@mastodon.social

                                                                      “We can automatically decode the output of this process using the default character encoding, by specifying text=True when we call subprocess.run:”

                                                                      Read more 👉 pym.dev/running-subprocesses-i

                                                                        Corentin boosted

                                                                        [?]andros » 🌐
                                                                        @andros@activity.andros.dev

                                                                        «Finger: the 1971 social network that never died»

                                                                        It will surprise more than a few of you to hear that the first social network dates back to 1971; no accounts, no algorithm, no central server, just a plain text file you control.

                                                                        https://en.andros.dev/blog/54572bc7/finger-the-1971-social-network-that-never-died/

                                                                        #Gemini #IndieWeb #OpenSource #Python #Linux #OrgSocial

                                                                          Debacle boosted

                                                                          [?]LWN.net » 🌐
                                                                          @lwn@fedi.lwn.net

                                                                          [$] Bootstrappable builds: how and why

                                                                          This year's edition of the Free and Open Source Software Yearly conference, better known as "FOSSY", moved north to the beautiful (and enormous) campus of the University of British [...]

                                                                          lwn.net/Articles/1088279/

                                                                            Fred de CLX boosted

                                                                            [?]BorgBackup » 🌐
                                                                            @borgbackup@fosstodon.org

                                                                            If anyone cares about and :

                                                                            github.com/borgbackup/borg/iss

                                                                            There is also an issue about that on the NetBSD issue tracker since quite a while, but guess it was overlooked.

                                                                              AodeRelay boosted

                                                                              [?]sven222 » 🌐
                                                                              @sven222@goto.hardwarepunk.de

                                                                              Ich habe mir letzte Woche von einem LLM ein kleines Pythonscript erstellen lassen. Es sollte meine .ssh/config auslesen, dort jeden eingetragenen Host finden, und dann für jeden Host einen übergebenen Befehl ausführen. Also ich rufe "./remote.py apt update" auf, und dadurch soll für jeden Host "ssh hostname apt update" aufgerufen werden. Bis alles funktioniert hat, dauerte es ca. 20min. Leider waren da recht komplexe Regular Expressions drinnen (ein Kenntnis die ich immer noch nicht erlangt habe) und ich habe nicht wirklich jede Zeile verstanden was dort vor sich ging. Wenn ich mich selbst hinsetze und das schreibe, was ich gerade versucht habe, brauche ich auch 20min. Habe dabei aber wieder etwas mehr Python gelernt anstatt prompts so zu formulieren, dass auch das dabei herauskommt was ich möchte. Ein weiterer Vorteil: ich verstehe jede Zeile meines Scripts.
                                                                              Mein Script ist übrigens eine Zeile kürzer wie das generierte, auch wenn das nur das "import re" ist, welches wegfällt. Ich programmiere ja viel Automatisierungen in der Industrie. Da sind wir es gewohnt lieber eine Zeile mehr zu programmieren, dafür ist es lesbarer für die Person, die das nach uns maintainen muss.
                                                                              Um fair zu sein sollte ich sagen, dass ich einige Fehler schon umgehen konnte, weil das LLM die schong emacht hatte, ich also eventuell selbst 5 - 10min länger gebraucht hätte.
                                                                              #linux #homeserver #python #scripting

                                                                                AodeRelay boosted

                                                                                [?]VibeOps » 🌐
                                                                                @vibeops@techhub.social

                                                                                Bei uns steht eine an - die ist weit weg - läuft n Jahr 24/7

                                                                                Mein Ich von 201x würd hier Programm schreiben und ne Kiste verwenden mit ner remote Desktop Lösungen aka anydesk

                                                                                Mein 2025 Ich hat schon dazu gelernt und ich hab n schickes Programm entwickelt... Auf dem - aber das ist lief auch schon testweise aufm

                                                                                Da wir das irgendwo Vorort Aufbau wollen wäre Laptop die beste Lösung - also mal im Schrank geschaut was da noch so ist: hp probook 650 g1 - i5 4gen 8gb RAM SSD drin -

                                                                                Debian mit KDE Plasma darauf - installiert - und dann wurde mir erst klar wie genial das wieder mal ist...

                                                                                Hermes mit hat Programm gecloned und automatisch in Betrieb genommen - hätte ich auch noch hinbekommen - Zeit gespart

                                                                                Mit Hermes und der Kommunikation über Matrix brauchen wir uns keine Gedanken über Netzwerk-Ports machen im Ziel Gebäude - alternativ können wir tailscale nach Installatieren

                                                                                Mit Hermes hab ich ein System das die Messung überwachen kann - läuft noch alles? Und dann direkt Bescheid sagt

                                                                                Noch verrückter - er kann mir dort Vorort auch debuggen und ggf fehler beheben obwohl das Gerät schon 400km weg von mir ist - wie wenn ich davor sitze

                                                                                Ich mach das mit den VServer Tag täglich - aber das mein Messtechnik Job so viel einfacher wird - das wird mir jetzt erst klar

                                                                                Könnte theoretisch 100 solche Messungen betreuen 🤯

                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                  @treyhunner@mastodon.social

                                                                                  Python Tip #229 (of 365):

                                                                                  Don't overuse classes.

                                                                                  Writing Python code does NOT require writing classes.

                                                                                  Unlike many programming languages, you can accomplish quite a bit in Python without ever making a class.

                                                                                  The most common reason to write a class is that a framework REQUIRES one (like Django's Model classes).

                                                                                  The best reason to write your OWN class: you have data and functionality that clearly belong together.

                                                                                  🧵 (1/3)

                                                                                    [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                    @djangocon@fosstodon.org

                                                                                    A welcoming community starts with all of us. 💚

                                                                                    As you prepare for DjangoCon US 2026, we encourage everyone to take a few minutes to read our Code of Conduct. It helps ensure our conference remains a safe, respectful, and inclusive space for all attendees.

                                                                                    🔗 Read it here: 2026.djangocon.us/conduct/

                                                                                      [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                      @djangocon@fosstodon.org

                                                                                      🎉 We’re excited to welcome Dawn Wages as a keynote speaker at DjangoCon US!

                                                                                      Drawing on Star Trek, Octavia Butler, and Afrofuturism, Dawn will explore leadership, belonging, community, and building better futures through open source.

                                                                                      📅 Aug 24–28 | Chicago
                                                                                      2026.djangocon.us/news/keynote

                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                        @hugovk@mastodon.social

                                                                                        RE: fosstodon.org/@dongheena/11711

                                                                                        🐍🇰🇷🏃‍♂️ Thanks to all the sprinters for contributing to , and to @dongheena for running this with me!

                                                                                        Lily boosted

                                                                                        [?]Donghee Na :python: » 🌐
                                                                                        @dongheena@fosstodon.org

                                                                                        Today, we held a CPython sprint in Seoul as part of PyCon Korea!

                                                                                        In just one day, participants created 19+ PRs, including devguide contributions and backport patches. It was great to see so many people contributing to CPython, especially first-time contributors.

                                                                                        Huge thanks to everyone who created the @europython sprint materials, which helped us a lot today, and to @hugovk for actively supporting and mentoring our participants throughout the sprint!

                                                                                            [?]The Blue Hydrangea » 🌐
                                                                                            @thebluehydrangea@thebluehydrangea.org

                                                                                            I've become interested in learning Python after doing a bit of scripting in Ruby... I wonder what is the best way of getting into programming with it? I suspect a good start would be to get Jupyter Lab installed, but is there a good book or website that people recommend for learning the language specifically? So far I've found Python's own website to be a great resource!

                                                                                              [?]Juhis » 🌐
                                                                                              @hamatti@mastodon.world

                                                                                              o is for orm

                                                                                              What a way to start a new week: talking about Django's ORM. Whether to like ORMs or not seems to be a divisive topic among developer. I love them and Django's one is my favourite flavour.

                                                                                              hamatti.org/posts/o-is-for-orm

                                                                                                [?]Deuchnord » 🌐
                                                                                                @deuchnord@social.deuchnord.fr

                                                                                                Maintenant que les démarches administratives sont faites, je peux enfin l'annoncer : je suis maintenant en freelance !
                                                                                                Développeur spécialisé dans le Web avec PHP (vanilla & Symfony) et Python (surtout avec Flask), avec de solides connaissances en JS (vanilla & Vue.js), je réalise tous les développements en tenant compte des besoins en accessibilité, en écoconception et du RGPD dès la conception.
                                                                                                Réalisations entièrement faites par un cerveau biologique.

                                                                                                  AodeRelay boosted

                                                                                                  [?]MiBaLinuxTech » 🌐
                                                                                                  @MiBaLinuxTech@mastodon.social

                                                                                                  🐍 Python Kurs #01 – Visual Studio Code installieren

                                                                                                  Du möchtest Python lernen? Dann starten wir mit der richtigen Entwicklungsumgebung! 🚀

                                                                                                  In Teil 1 der modernisierten Python-Serie installieren wir Visual Studio Code und bereiten alles für die ersten eigenen Python-Programme vor.

                                                                                                  👉 Ideal für Python-Anfänger
                                                                                                  👉 Schritt für Schritt erklärt
                                                                                                  👉 Grundlage für die kommenden Folgen

                                                                                                  📺 Die Python-Serie:
                                                                                                  youtube.com/playlist?list=PLq7

                                                                                                  controlc boosted

                                                                                                  [?]Jobs for Developers » 🤖 🌐
                                                                                                  @jobsfordevelopers@mastodon.world

                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                  @treyhunner@mastodon.social

                                                                                                  “You don't need to implement binary search yourself.”

                                                                                                  Read more 👉 pym.dev/binary-search/

                                                                                                    [?]Frank Wiles » 🌐
                                                                                                    @frank@frankwiles.social

                                                                                                    Not going to make it to Chicago for DjangoCon US 2026? That's ok, I mean I'll miss you, but did you know you can watch all of the talk lives for cheap? Grab a ticket and help support the conference and community! ti.to/defna/djangocon-us-2026

                                                                                                      [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                      @djangocon@fosstodon.org

                                                                                                      A huge thank you to REVSYS for sponsoring DjangoCon US 2026! 🎉

                                                                                                      For years, REVSYS has been a valued part of the Django ecosystem, helping organizations build and maintain reliable Django applications while supporting the open source community.

                                                                                                      We're grateful for your support!

                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                        @treyhunner@mastodon.social

                                                                                                        Python Tip #228 (of 365):

                                                                                                        Don't catch NameError exceptions. 🧵

                                                                                                        This is an issue:

                                                                                                        try:
                                                                                                        start, end = parse_date(row["start"]), parse_date(row["end"])
                                                                                                        except (ValueError, TypeError, KeyError, NameError):
                                                                                                        print(f"Invalid date on line {n}", file=sys.stderr)
                                                                                                        continue

                                                                                                        A NameError is raised when a variable isn't defined... which usually means a variable name was MISSPELLED.

                                                                                                        🧵 (1/3)

                                                                                                          [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                          @djangocon@fosstodon.org

                                                                                                          Just 8 days left until DjangoCon US! 🎉

                                                                                                          Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                          📅 2026.djangocon.us/

                                                                                                            [?]Cheuk Ting Ho » 🌐
                                                                                                            @cheukting_ho@fosstodon.org

                                                                                                            I am excited about where I will give my talk debut. どうぞよろしくね!Also there will be dedicated sessions. Come join us!

                                                                                                              AodeRelay boosted

                                                                                                              [?]MatsurikaGaming » 🌐
                                                                                                              @MatsurikaGaming@troet.cafe

                                                                                                              Ihr erinnert mich an mein CachyOS Couch Gaming Experiment?

                                                                                                              Ich bin endlich mal dazu gekommen, den Frickelcode meines Gamepad-Login-Screens ein wenig aufzuräumen und auf GitHub hochzuladen.

                                                                                                              Ich bin nicht ganz sicher, ob die Anleitung vollständig und verständlich ist. Es könnte sein, dass ich noch ein paar Rechteeinstellungen vergessen habe. Also schaut gerne rein und testet es aus

                                                                                                              github.com/Nephirelle/gamepad_

                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                @hugovk@mastodon.social

                                                                                                                You've all started testing the 3.15 release candidate, right?
                                                                                                                Oh, you can't because it's not on AWS Lambda? Good news, it's now available along with Node.js 26 as a preview:
                                                                                                                aws-news.com/article/2026-08-1

                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                  @treyhunner@mastodon.social

                                                                                                                  Python Tip #227 (of 365):

                                                                                                                  Don't rely on clever implementation details. 🧵

                                                                                                                  In CPython, two 3's are identical:

                                                                                                                  >>> x = 3
                                                                                                                  >>> y = 3
                                                                                                                  >>> x is y
                                                                                                                  True

                                                                                                                  But two 300's are not always identical:

                                                                                                                  >>> x = 300
                                                                                                                  >>> y = 300
                                                                                                                  >>> x is y
                                                                                                                  False

                                                                                                                  Don't rely on this. Compare numbers with ==.

                                                                                                                  In CPython, integers from -5 to 256 are created on launch, so every 200 is identical to every other 200.

                                                                                                                  Bigger numbers are only identical sometimes:

                                                                                                                  >>> x, y = 300, 300
                                                                                                                  >>> x is y
                                                                                                                  True

                                                                                                                  🧵 (1/2)

                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                    @treyhunner@mastodon.social

                                                                                                                    Alex Martelli coined the term "goose typing" to describe this ability in Python to practice duck typing while also using isinstance and issubclass.

                                                                                                                    Read more 👉 pym.dev/goose-typing/

                                                                                                                      [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                      @djangocon@fosstodon.org

                                                                                                                      Just 9 days left until DjangoCon US! 🎉

                                                                                                                      Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                                      📅 2026.djangocon.us/

                                                                                                                        [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                        @djangocon@fosstodon.org

                                                                                                                        The best recruiters are where the developers are.

                                                                                                                        @foxleytalent is the go-to recruiter for the Django community in the US, and Jon Gould will be back in Chicago for his fourth DjangoCon US!

                                                                                                                        We’re looking forward to having Foxley Talent and Jon with us in Chicago! 🐍

                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                          @hugovk@mastodon.social

                                                                                                                          Fun first day at , meeting the local community and especially hearing how they're not only building but sustaining communities:

                                                                                                                          🐍 @dongheena building a language support team, starting informally to encourage participation

                                                                                                                          🐍Luna building PyLadies Seoul through asking for help and learning to teach

                                                                                                                          🐍 Jiwoo Oh, Jiyoung Hwang & Juyeong Lee jumped right into a big open-source project and learned early the importance of collaboration

                                                                                                                          the words "PyCon Korea" on a wall, composed from the names of attendees.

                                                                                                                          Alt...the words "PyCon Korea" on a wall, composed from the names of attendees.

                                                                                                                          Let’s Build a Python Language Support Team
- Donghee Na

                                                                                                                          Alt...Let’s Build a Python Language Support Team - Donghee Na

                                                                                                                          Growth together with PyLadies Seoul
- Luna

                                                                                                                          Alt...Growth together with PyLadies Seoul - Luna

                                                                                                                          "Is it really okay to change it like this...?" An Undergrad's Journey of Contributing to OpenStack (feat. Surviving the Python Ecosystem)
-
Jiwoo Oh, Jiyoung Hwang
, Juyeong Lee

                                                                                                                          Alt..."Is it really okay to change it like this...?" An Undergrad's Journey of Contributing to OpenStack (feat. Surviving the Python Ecosystem) - Jiwoo Oh, Jiyoung Hwang , Juyeong Lee

                                                                                                                            [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                            @djangocon@fosstodon.org

                                                                                                                            Want to get more involved at DjangoCon US? 🙋

                                                                                                                            Volunteering is a great way to meet people, give back to the community, and help make the conference possible.

                                                                                                                            📖 Learn more: 2026.djangocon.us/news/why-you

                                                                                                                            Sign up: automation.defna.org/volunteer

                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                              @treyhunner@mastodon.social

                                                                                                                              Python Tip #226 (of 365):

                                                                                                                              Don't assign to global variables from within a function.

                                                                                                                              You CAN do this in Python. But you really shouldn't.

                                                                                                                              Yesterday's tip noted that assignments within a function NORMALLY make local variables.

                                                                                                                              But they don't always...

                                                                                                                              Python's "global" statement is the exception:

                                                                                                                              >>> phrase = "Hi world"
                                                                                                                              >>> def set_phrase(name):
                                                                                                                              ... global phrase
                                                                                                                              ... phrase = f"Hello {name}"
                                                                                                                              ...
                                                                                                                              >>> set_phrase("Trey")
                                                                                                                              >>> phrase
                                                                                                                              'Hello Trey'

                                                                                                                              🧵 (1/2)

                                                                                                                                [?]thesupertechie (she/they) [she/they/ella/elle/ள்/ர்] » 🌐
                                                                                                                                @thesupertechie@mastodon.social

                                                                                                                                I have an open source project: codeberg.org/thesupertechie/pn

                                                                                                                                For now it's very barebones. Anyone know where to get suggestions for improving it further?

                                                                                                                                  [?]G. Clavier » 🌐
                                                                                                                                  @Enthalpiste@social.sciences.re

                                                                                                                                  Le mec se dit "Bon bah maintenant que a embrassé le , il serait peut être temps de jeter un coup d'oeil a ."

                                                                                                                                  Un coup d'oeil au commit sur le depo de la lib standard, des commits de dans tous les sens.

                                                                                                                                  Bon bah il est peut être temps de quitter le calcul scientifique finalement.

                                                                                                                                    [?]Django News » 🤖 🌐
                                                                                                                                    @djangonews@mastodon.social

                                                                                                                                    [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                    @djangocon@fosstodon.org

                                                                                                                                    Just 10 days left until DjangoCon US! 🎉

                                                                                                                                    Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                                                    📅 2026.djangocon.us/

                                                                                                                                      [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                      @djangocon@fosstodon.org

                                                                                                                                      Have something you'd love to discuss at DjangoCon US? 📌

                                                                                                                                      We're introducing Open Spaces, participant-driven sessions where you choose the topic and start the conversation.

                                                                                                                                      No talk or presentation required. Bring an idea and see who joins!

                                                                                                                                      📖 Learn more: 2026.djangocon.us/news/open-sp

                                                                                                                                        [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                        @djangocon@fosstodon.org

                                                                                                                                        Thank you to Caktus Group for sponsoring DjangoCon US 2026! 🎉

                                                                                                                                        Your continued support of Django and the open source community helps bring developers together to learn, collaborate, and connect.

                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                          “When I need to run multiple subprocesses within the same Python script, I often find myself passing the same keyword arguments over and over to the run function.”

                                                                                                                                          Read more 👉 pym.dev/running-subprocesses-i

                                                                                                                                            [?]Pete Prodoehl 🍕 » 🌐
                                                                                                                                            @rasterweb@mastodon.social

                                                                                                                                            And here are my bike riding numbers from 2025. I started having back/leg/nerve pain at the end of November. It will always bother me that I didn't get 2,000 miles in 2025.

                                                                                                                                            (August is when I started riding an ebike and commuting to work and riding a lot, lot, lot more!)

                                                                                                                                            Graph with bike ride stats from 2025.

                                                                                                                                            Alt...Graph with bike ride stats from 2025.

                                                                                                                                            Graph with bike ride stats from 2025.

                                                                                                                                            Alt...Graph with bike ride stats from 2025.

                                                                                                                                            Graph with bike ride stats from 2025.

                                                                                                                                            Alt...Graph with bike ride stats from 2025.

                                                                                                                                            Graph with bike ride stats from 2025.

                                                                                                                                            Alt...Graph with bike ride stats from 2025.

                                                                                                                                              [?]Pete Prodoehl 🍕 » 🌐
                                                                                                                                              @rasterweb@mastodon.social

                                                                                                                                              My bike riding has been poor this year, due to spinal stenosis and then spinal surgery in June... but hopefully the numbers will go up for the rest of the year.

                                                                                                                                              (And who knows? Maybe I'll update some of the Python code that generates these.)

                                                                                                                                              Graph with bike riding data.

                                                                                                                                              Alt...Graph with bike riding data.

                                                                                                                                              Graph with bike riding data.

                                                                                                                                              Alt...Graph with bike riding data.

                                                                                                                                              Graph with bike riding data.

                                                                                                                                              Alt...Graph with bike riding data.

                                                                                                                                              Graph with bike riding data.

                                                                                                                                              Alt...Graph with bike riding data.

                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                sincewhen now includes features that are removed from Python and their removal version.

                                                                                                                                                pym.dev/since or "uvx sincewhen"

                                                                                                                                                If you catch features it doesn't handle that you think it should, let me know.

                                                                                                                                                  [?]Python Rennes » 🌐
                                                                                                                                                  @pythonrennes@social.breizhcamp.org

                                                                                                                                                  ⚠️ si vous utilisez une str et que vous migrez de 3.10 à 3.11+ attention à ce changement de comportement :

                                                                                                                                                  from enum import Enum
                                                                                                                                                  class Meetup(str, Enum):
                                                                                                                                                  PYTHON = 'python'
                                                                                                                                                  JS = 'js'
                                                                                                                                                  print(f'{Meetup.PYTHON}')
                                                                                                                                                  # 'python' pour 3.10
                                                                                                                                                  # 'Meetup.PYTHON' pour 3.11+

                                                                                                                                                  Une conséquence de peps.python.org/pep-0663/.

                                                                                                                                                  Pour revenir au comportement d'avant :

                                                                                                                                                  - utiliser Meetup.PYTHON.value
                                                                                                                                                  - implémenter la méthode __str__ :

                                                                                                                                                  class Meetup(str, Enum):
                                                                                                                                                  def __str__(self):
                                                                                                                                                  return self.value

                                                                                                                                                    [?]Kushal Das :python: :tor: 🇸🇪 » 🌐
                                                                                                                                                    @kushal@toots.dgplug.org

                                                                                                                                                    Released a new version of my library for @signalapp pypi.org/project/replyfast/

                                                                                                                                                      [?]Jeff Triplett » 🌐
                                                                                                                                                      @webology@mastodon.social

                                                                                                                                                      ⬆️ I updated django-cli-no-admin last night to support Django 6.1, Python 3.15, and Python's free-threaded versions.

                                                                                                                                                      Given the nature of the project, that means pyproject.toml updates 😬

                                                                                                                                                      I also tried out the trusting publisher thing, and it worked too. 🎉

                                                                                                                                                      github.com/jefftriplett/django

                                                                                                                                                        [?]max. » 🌐
                                                                                                                                                        @makszilla@piaille.fr

                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                        Python Tip #225 (of 365):

                                                                                                                                                        Avoid creating local variables that share a name with a global variable.

                                                                                                                                                        This is called SHADOWING, and it can make for confusing code.

                                                                                                                                                        Assigning to a variable inside a function normally makes a LOCAL variable:

                                                                                                                                                        >>> phrase = "Hi!"
                                                                                                                                                        >>> def set_phrase(name):
                                                                                                                                                        ... phrase = f"Hello {name}"
                                                                                                                                                        >>> set_phrase("Trey")
                                                                                                                                                        >>> phrase
                                                                                                                                                        'Hi!'

                                                                                                                                                        The global phrase never changed. The function makes a LOCAL phrase that disappears when it returns.

                                                                                                                                                        🧵 (1/3)

                                                                                                                                                          [?]Juhis » 🌐
                                                                                                                                                          @hamatti@mastodon.world

                                                                                                                                                          l is for learning.

                                                                                                                                                          Life of a software developer is one of continuous learning. There's always something new to learn and so many resources to learn from.

                                                                                                                                                          Today I shared a couple of book and podcasts recommendations and a long list of amazing people who write about Python on their websites.

                                                                                                                                                          hamatti.org/posts/l-is-for-lea

                                                                                                                                                            [?]David Lord :python: » 🌐
                                                                                                                                                            @davidism@mas.to

                                                                                                                                                            I need to think about how I'm voting the Packaging Council election. So many great nominees, but a lot that I don't recognize because they're dealing with a different part of the ecosystem and not the core where I know the most people. I feel like I want the inaugural council to be core people who were already setting a good direction, but "who I know" also feels like the wrong way to vote. And there's still too many people who I know! 😅 python.org/nominations/electio

                                                                                                                                                              [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                              @djangocon@fosstodon.org

                                                                                                                                                              Just 11 days left until DjangoCon US! 🎉

                                                                                                                                                              Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                                                                              📅 2026.djangocon.us/

                                                                                                                                                                [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                @djangocon@fosstodon.org

                                                                                                                                                                A big thank you to Two Rock Software for supporting DjangoCon US 2026! 🎉

                                                                                                                                                                Your sponsorship helps bring together the global Django community for a week of talks, collaboration, and open source contributions.

                                                                                                                                                                We appreciate your support!

                                                                                                                                                                  [?]Python Software Foundation » 🌐
                                                                                                                                                                  @ThePSF@fosstodon.org

                                                                                                                                                                  We're also excited to announce the nominees for the inaugural Python Packaging Council 🤩 make sure to check out everyone's nomination statements to learn more about this years candidates! (And make sure to affirm your intention to vote by August 25th, 2 PM UTC!) pyfound.blogspot.com/2026/08/a

                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                    “It's actually possible to use isinstance and practice duck typing at the same time!”

                                                                                                                                                                    Read more 👉 pym.dev/goose-typing/

                                                                                                                                                                      [?]Python Software Foundation » 🌐
                                                                                                                                                                      @ThePSF@fosstodon.org

                                                                                                                                                                      We're also excited to announce the nominees for the inaugural Python Packaging Council 🤩 make sure to check out everyone's nomination statements to learn more about this years candidates! (And make sure to affirm your intention to vote by August 25th, 2 PM UTC!) pyfound.blogspot.com/2026/08/a

                                                                                                                                                                        [?]Python Software Foundation » 🌐
                                                                                                                                                                        @ThePSF@fosstodon.org

                                                                                                                                                                        We're excited to announce the nominees for the 2026 PSF Board Election 🤩 make sure to check out everyone's nomination statements to learn more about this years candidates! (And make sure to affirm your intention to vote by August 25th, 2 PM UTC!)
                                                                                                                                                                        pyfound.blogspot.com/2026/08/a

                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                          Python Tip #224 (of 365):

                                                                                                                                                                          Constants that are specific to a class often belong ON that class.

                                                                                                                                                                          class Circle:
                                                                                                                                                                          max_radius = 100
                                                                                                                                                                          def __init__(self, radius):
                                                                                                                                                                          if radius > self.max_radius:
                                                                                                                                                                          raise ValueError(f"Radius can't exceed {self.max_radius}")
                                                                                                                                                                          self.radius = radius

                                                                                                                                                                          But, why make max_radius a class attribute instead of a module-level MAX_RADIUS constant...?

                                                                                                                                                                          🧵 (1/3)

                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                            I decided to play with a silly idea: reorganizing 's junk drawer module (I say "junk drawer" affectionately here).

                                                                                                                                                                            treyhunner.com/2026/08/reorgan

                                                                                                                                                                              [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                              @djangocon@fosstodon.org

                                                                                                                                                                              Just 12 days left until DjangoCon US! 🎉

                                                                                                                                                                              Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                                                                                              📅 2026.djangocon.us/

                                                                                                                                                                                [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                @adamchainz@fosstodon.org

                                                                                                                                                                                📦 New package day! This time a Rusty rewrite of the emoji package: 3.5x faster for conversion, 70 times faster for deconversion, and using about 40% less memory.

                                                                                                                                                                                adamj.eu/tech/2026/08/12/pytho

                                                                                                                                                                                  [?]Glyph » 🌐
                                                                                                                                                                                  @glyph@mastodon.social

                                                                                                                                                                                  it's that time again! upgrade your on macOS with `mopup`:

                                                                                                                                                                                  a terminal running `pipx run --python python3.14 mopup` and upgrading from 3.14.6 to 3.14.7

                                                                                                                                                                                  Alt...a terminal running `pipx run --python python3.14 mopup` and upgrading from 3.14.6 to 3.14.7

                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                    “But self-concatenation doesn't copy anything, so don't try to use it to make lists of mutable values like lists-of-lists.”

                                                                                                                                                                                    Read more 👉 pym.dev/self-concatenation/

                                                                                                                                                                                      [?]Python Rennes » 🌐
                                                                                                                                                                                      @pythonrennes@social.breizhcamp.org

                                                                                                                                                                                      RE: fosstodon.org/@ThePSF/11704441

                                                                                                                                                                                      la communauté Python lance un sondage sur les pratiques d'utilisation et l'outillage autour du typage des valeurs : surveymonkey.com/r/python_typi

                                                                                                                                                                                      [?]Python Software Foundation » 🌐
                                                                                                                                                                                      @ThePSF@fosstodon.org

                                                                                                                                                                                      The 2026 Python Type System & Tooling Survey is live 🐍📝❓ No typing experience needed—your perspective as a dev matters most. Take a couple minutes to help improve Python typing for all!

                                                                                                                                                                                      surveymonkey.com/r/python_typi

                                                                                                                                                                                      This survey was developed with support from the Pyrefly team at Meta, the PyCharm team at JetBrains, the Python team at Microsoft, and the typing community on discourse.python.org.

                                                                                                                                                                                        [?]Python Rennes » 🌐
                                                                                                                                                                                        @pythonrennes@social.breizhcamp.org

                                                                                                                                                                                        xy est une bibliothèque permettant de simplement réaliser des graphiques interactifs 2D pour le web ou les notebooks. Elles supporte l'affichage de nombreux points grace à son cœur écrit en rust qui détermine ce qui a besoin d'etre affiché : github.com/reflex-dev/xy

                                                                                                                                                                                          [?]Fabien LOISON (FLOZz) » 🌐
                                                                                                                                                                                          @FLOZz@mastodon.social

                                                                                                                                                                                          🟣 Nouveau journal de bord sur le blog !

                                                                                                                                                                                          ➡️ blog.flozz.fr/2026/08/12/journ

                                                                                                                                                                                          Aujourd'hui je vais vous parler un peu d'une amélioration que j'ai développé pour ma lib rst2gemtext suite à un besoin de @Dryusdan, d'un petit changement que j'ai apporté au blog, et d'une réflexion que j'ai eu sur la langue dans laquelle je publie suite à la lecture d'un article de @Edent

                                                                                                                                                                                          Bonne lecture ! 😁

                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                            Python Tip #223 (of 365):

                                                                                                                                                                                            Consider copying mutable arguments in your class initializers.

                                                                                                                                                                                            What happens if two objects are given the SAME list?

                                                                                                                                                                                            >>> initial_tasks = ['Watch screencast', 'Brush teeth']
                                                                                                                                                                                            >>> mon = TodoList(initial_tasks)
                                                                                                                                                                                            >>> tue = TodoList(initial_tasks)

                                                                                                                                                                                            It depends...

                                                                                                                                                                                            🧵 (1/4)

                                                                                                                                                                                              [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                              @djangocon@fosstodon.org

                                                                                                                                                                                              Our last sprint office hour kicks off in an hour. Join us to get help configuring your machine. We'll be on the `welcome` Django Discord channel at chat.djangoproject.com

                                                                                                                                                                                                [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                @djangocon@fosstodon.org

                                                                                                                                                                                                A sincere thank you to JBS Solutions for sponsoring DjangoCon US 2026! 🎉

                                                                                                                                                                                                Your support helps make DjangoCon a place where developers, maintainers, and newcomers can come together to learn and collaborate.

                                                                                                                                                                                                We're grateful to have you with us!

                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                  “When you need to launch a subprocess from within Python, I recommend using the run function from Python's subprocess module.”

                                                                                                                                                                                                  Read more 👉 pym.dev/running-subprocesses-i

                                                                                                                                                                                                    [?]andros » 🌐
                                                                                                                                                                                                    @andros@activity.andros.dev

                                                                                                                                                                                                    «HTML over WebSockets: real-time SPAs with barely any JavaScript»

                                                                                                                                                                                                    Building a SPA usually means a JS framework, a JSON API, and two codebases forced to agree on a contract; there is another way that skips all three, and it is not new.

                                                                                                                                                                                                    https://en.andros.dev/blog/ef4968f5/html-over-websockets-real-time-spas-with-barely-any-javascript/

                                                                                                                                                                                                    #Web #JavaScript #Python #Django #WebSockets #DjangoLiveView

                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                      Python Tip #222 (of 365):

                                                                                                                                                                                                      Be careful with mutable default values in function definitions.

                                                                                                                                                                                                      This class has a bug:

                                                                                                                                                                                                      class TodoList:
                                                                                                                                                                                                      def __init__(self, tasks=[]):
                                                                                                                                                                                                      self.tasks = tasks

                                                                                                                                                                                                      def add_task(self, task):
                                                                                                                                                                                                      self.tasks.append(task)

                                                                                                                                                                                                      Every TodoList object made without arguments shares the SAME list:

                                                                                                                                                                                                      >>> mon = TodoList()
                                                                                                                                                                                                      >>> tue = TodoList()
                                                                                                                                                                                                      >>> mon.add_task("Work on Python exercise")
                                                                                                                                                                                                      >>> tue.tasks
                                                                                                                                                                                                      ['Work on Python exercise']

                                                                                                                                                                                                      🧵 (1/3)

                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                        “Python's f-strings are great, but if you just need to smoosh a few values together with spaces between them, consider passing separate arguments to print.”

                                                                                                                                                                                                        Read more 👉 pym.dev/print-features/

                                                                                                                                                                                                          [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                          @djangocon@fosstodon.org

                                                                                                                                                                                                          Thinking about giving a Lightning Talk at DjangoCon US 2026?

                                                                                                                                                                                                          You’ve got five minutes to share an idea, project, lesson, story, or something you’ve learned and you don’t need to be an experienced speaker!

                                                                                                                                                                                                          2026.djangocon.us/news/lightning-talks/

                                                                                                                                                                                                            [?]Mariusz Felisiak » 🌐
                                                                                                                                                                                                            @felixxm@fosstodon.org

                                                                                                                                                                                                            Who would expect that my tiny contribution would be merged into Python 🐍 🎉 Be patient folks, there is no rush 🧘

                                                                                                                                                                                                            github.com/python/cpython/pull

                                                                                                                                                                                                              [?]James Bennett [he/him] » 🌐
                                                                                                                                                                                                              @ubernostrum@infosec.exchange

                                                                                                                                                                                                              Last year @yossarian wrote a brief post on the surprising complexity of the "splitlines()" method. As a busy Unicode pedant, it took me a while to write up something explaining *why* it's complex, but here it finally is:

                                                                                                                                                                                                              b-list.org/weblog/2026/aug/10/

                                                                                                                                                                                                                [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                @djangocon@fosstodon.org

                                                                                                                                                                                                                Just 2 weeks left until DjangoCon US! 🎉

                                                                                                                                                                                                                Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                                                                                                                                📅 2026.djangocon.us/

                                                                                                                                                                                                                  [?]LWN.net » 🌐
                                                                                                                                                                                                                  @lwn@fedi.lwn.net

                                                                                                                                                                                                                  Django moves to an annual release cycle

                                                                                                                                                                                                                  lwn.net/Articles/1088059/

                                                                                                                                                                                                                    [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                    @ThePSF@fosstodon.org

                                                                                                                                                                                                                    Need more information on running for the inaugural Python Packaging Council? Check out our blog post: pyfound.blogspot.com/2026/07/g

                                                                                                                                                                                                                      [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                      @ThePSF@fosstodon.org

                                                                                                                                                                                                                      Need more information on running for the PSF Board? Check out our blog post: pyfound.blogspot.com/2026/07/g

                                                                                                                                                                                                                        [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                        @ThePSF@fosstodon.org

                                                                                                                                                                                                                        You have a little more than 24 hours left to submit a PSF Board or Python Packaging Council nomination for yourself or someone else 🩵🐍💛 Submit your nominations by tomorrow, Tuesday, August 11th, 2:00 pm UTC!
                                                                                                                                                                                                                        python.org/nominations/electio

                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                          Python Tip #221 (of 365):

                                                                                                                                                                                                                          Implement appropriate dunder methods.

                                                                                                                                                                                                                          Dunder methods are a contract between your class and the Python interpreter.

                                                                                                                                                                                                                          • __add__ & __radd__ power +
                                                                                                                                                                                                                          • __eq__ powers ==
                                                                                                                                                                                                                          • __len__ powers len()

                                                                                                                                                                                                                          Dunder methods are what third-party library authors use to make their objects feel like NATIVE Python objects.

                                                                                                                                                                                                                          Django QuerySet objects support indexing, iteration, len(...), and truthiness.

                                                                                                                                                                                                                          And Pandas DataFrames support a whole BUNCH of syntax.

                                                                                                                                                                                                                          🧵 (1/2)

                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                            “In addition to os.name and sys.platform, there's an even higher level approach to find the platform that your code is running on, with the platform module.”

                                                                                                                                                                                                                            Read more 👉 pym.dev/operating-system-check

                                                                                                                                                                                                                              [?]Juhis » 🌐
                                                                                                                                                                                                                              @hamatti@mastodon.world

                                                                                                                                                                                                                              h is for htmx

                                                                                                                                                                                                                              A short teaser for htmx for those who don't yet know it exists. I plan to write more in-depth posts about it when I'm not in a daily post grind like with Blaugust but wanted to give a shoutout to it anyway.

                                                                                                                                                                                                                              For the past couple of years, all my new Django projects are built with htmx and it's one of my favourite tools in my toolbox these days.

                                                                                                                                                                                                                              hamatti.org/posts/h-is-for-htm

                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                Python Tip #220 (of 365):

                                                                                                                                                                                                                                Trying quack like a duck? Seek help.

                                                                                                                                                                                                                                When implementing a common Python protocol (a sequence, a mapping, etc.), inherit from the matching abstract base class (ABC):

                                                                                                                                                                                                                                from collections.abc import MutableSequence

                                                                                                                                                                                                                                class MyCustomList(MutableSequence):
                                                                                                                                                                                                                                ...

                                                                                                                                                                                                                                Benefits:

                                                                                                                                                                                                                                1. isinstance & issubclass checks work well (i.e. isinstance(x, Sequence))

                                                                                                                                                                                                                                2. Python will complain LOUDLY if you forget to implement a required method for the protocol

                                                                                                                                                                                                                                🧵 (1/3)

                                                                                                                                                                                                                                  [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                  @adamchainz@fosstodon.org

                                                                                                                                                                                                                                  ✍️ I just released a new version of my little Python profiler, tprof, with less overhead for more accurate results.

                                                                                                                                                                                                                                  adamj.eu/tech/2026/08/08/pytho

                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                    “As you write your code, pause and ask: “what should stand out here at a glance?””

                                                                                                                                                                                                                                    Read more 👉 pym.dev/embrace-whitespace/

                                                                                                                                                                                                                                      [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                      @djangocon@fosstodon.org

                                                                                                                                                                                                                                      We’re thrilled to welcome pganalyze as a sponsor of Django Girls Chicago 2026! 🎉

                                                                                                                                                                                                                                      Thank you, pganalyze, for supporting our mission to make tech more accessible and helping fund this free, hands-on Django workshop for women in Chicago.

                                                                                                                                                                                                                                      💚

                                                                                                                                                                                                                                        [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                        @djangocon@fosstodon.org

                                                                                                                                                                                                                                        19 days until DjangoCon US! 🎉

                                                                                                                                                                                                                                        Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                                                                                                                                                        📅 2026.djangocon.us/

                                                                                                                                                                                                                                          Lily boosted

                                                                                                                                                                                                                                          [?]Marijke Luttekes [she/her] » 🌐
                                                                                                                                                                                                                                          @mahryekuh@hachyderm.io

                                                                                                                                                                                                                                          RE: mastodon.social/@djangonews/11

                                                                                                                                                                                                                                          New Django just dropped! 🙌🏻 🚀

                                                                                                                                                                                                                                          I’m happy to see an implementation of one of my accessibility feature requests in there as well: `django.db.models.fields.BLANK_CHOICE_LABEL`.

                                                                                                                                                                                                                                          I don’t have the spoons to explain it right now, but the backstory is in the ticket.

                                                                                                                                                                                                                                            [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                            @djangocon@fosstodon.org

                                                                                                                                                                                                                                            We're grateful to Six Feet Up for supporting DjangoCon US 2026! 🎉

                                                                                                                                                                                                                                            Their commitment to the Python and Django ecosystem helps make this conference possible and supports a welcoming space for learning, collaboration, and open source.

                                                                                                                                                                                                                                              [?]codingjoe :django: :python: » 🌐
                                                                                                                                                                                                                                              @codingjoe@fosstodon.org

                                                                                                                                                                                                                                              [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                              @djangocon@fosstodon.org

                                                                                                                                                                                                                                              17 days until DjangoCon US! 🎉

                                                                                                                                                                                                                                              Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                                                                                                                                                              📅 2026.djangocon.us/

                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                New article on goose typing in Python (yes, that's actually a thing).

                                                                                                                                                                                                                                                You can duck typing WHILE type checking.

                                                                                                                                                                                                                                                pym.dev/goose-typing

                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                  Python Tip #219 (of 365):

                                                                                                                                                                                                                                                  Validate your ducks with goose typing.

                                                                                                                                                                                                                                                  You can use isinstance() WHILE duck typing. This is called goose typing (coined by Alex Martelli).

                                                                                                                                                                                                                                                  >>> from collections‍.abc import Iterable
                                                                                                                                                                                                                                                  >>> isinstance([1, 2, 3], Iterable)
                                                                                                                                                                                                                                                  True

                                                                                                                                                                                                                                                  Point doesn't inherit from Iterable:

                                                                                                                                                                                                                                                  class Point:
                                                                                                                                                                                                                                                  def __init__(self, x, y): self.x, self.y = x, y
                                                                                                                                                                                                                                                  def __iter__(self): yield from (self.x, self.y)

                                                                                                                                                                                                                                                  And yet...

                                                                                                                                                                                                                                                  >>> isinstance(Point(1, 2), Iterable)
                                                                                                                                                                                                                                                  True

                                                                                                                                                                                                                                                  🧵 (1/3)

                                                                                                                                                                                                                                                    [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                    @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                    🎨 I’m really enjoying the redesigned PyPI project pages. Thanks to Nicole Harris and team for making these improvements!

                                                                                                                                                                                                                                                    Blog post:

                                                                                                                                                                                                                                                    blog.pypi.org/posts/2026-07-22

                                                                                                                                                                                                                                                    Django’s project page on PyPI, showcasing the new design.

                                                                                                                                                                                                                                                    Alt...Django’s project page on PyPI, showcasing the new design.

                                                                                                                                                                                                                                                      [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                      @djangocon@fosstodon.org

                                                                                                                                                                                                                                                      We’re thrilled to welcome REVSYS as a sponsor of Django Girls Chicago 2026! 🎉

                                                                                                                                                                                                                                                      Thank you, REVSYS, for supporting our mission to make tech more accessible and helping fund this free, hands-on Django workshop for women in Chicago.

                                                                                                                                                                                                                                                      💚

                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                        @mgorny The good news is that was merged in 2024 but never actually released, so this change only affects those using unreleased source directly? And it's been archived on PyPI, so perhaps find a replacement.

                                                                                                                                                                                                                                                          [?]Jesus Michał von Gentoo 🏔 (he) » 🌐
                                                                                                                                                                                                                                                          @mgorny@social.treehouse.systems

                                                                                                                                                                                                                                                          Today in things that couldn't have aged well:

                                                                                                                                                                                                                                                          "Unpin flit-core dependency" 2 years ago without actually updating the metadata to use the newer pyproject.toml format.

                                                                                                                                                                                                                                                          github.com/sethmlarson/socksio

                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                            Python Tip #218 (of 365):

                                                                                                                                                                                                                                                            Don't needlessly convert between data types.

                                                                                                                                                                                                                                                            Looping over a file once? There's no reason to convert it to a list first:

                                                                                                                                                                                                                                                            for line in my_file:
                                                                                                                                                                                                                                                            print(line, end="")

                                                                                                                                                                                                                                                            Another example: if you're looping over a set, there's no reason to convert it to a list either:

                                                                                                                                                                                                                                                            >>> colors = {'red', 'blue', 'yellow'}
                                                                                                                                                                                                                                                            >>> for color in colors:
                                                                                                                                                                                                                                                            ... print(color)
                                                                                                                                                                                                                                                            ...
                                                                                                                                                                                                                                                            red
                                                                                                                                                                                                                                                            yellow
                                                                                                                                                                                                                                                            blue

                                                                                                                                                                                                                                                            "for" loops don't need a list. They accept ANY iterable.

                                                                                                                                                                                                                                                            🧵 (1/2)

                                                                                                                                                                                                                                                              [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                              @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                              🆙 Updated my post on unittest base test cases with a new preferred technique: using a plain class as a container.

                                                                                                                                                                                                                                                              adamj.eu/tech/2025/05/30/pytho

                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                Python 3.15.0 release candidate 1 is out!

                                                                                                                                                                                                                                                                python.org/downloads/release/p

                                                                                                                                                                                                                                                                Test your code against it and let the core devs know if you find bugs!

                                                                                                                                                                                                                                                                If you have uv, getting it is easy:

                                                                                                                                                                                                                                                                uv self update
                                                                                                                                                                                                                                                                uv python install

                                                                                                                                                                                                                                                                That even works if you already have an alpha or beta version installed (it'll upgrade it for you).

                                                                                                                                                                                                                                                                  [?]Jeff Triplett » 🌐
                                                                                                                                                                                                                                                                  @webology@mastodon.social

                                                                                                                                                                                                                                                                  RE: fosstodon.org/@ThePSF/11704441

                                                                                                                                                                                                                                                                  For devs who like to fill out surveys... ✅

                                                                                                                                                                                                                                                                  [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                  @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                  The 2026 Python Type System & Tooling Survey is live 🐍📝❓ No typing experience needed—your perspective as a dev matters most. Take a couple minutes to help improve Python typing for all!

                                                                                                                                                                                                                                                                  surveymonkey.com/r/python_typi

                                                                                                                                                                                                                                                                  This survey was developed with support from the Pyrefly team at Meta, the PyCharm team at JetBrains, the Python team at Microsoft, and the typing community on discourse.python.org.

                                                                                                                                                                                                                                                                      [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                      @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                      The 2026 Python Type System & Tooling Survey is live 🐍📝❓ No typing experience needed—your perspective as a dev matters most. Take a couple minutes to help improve Python typing for all!

                                                                                                                                                                                                                                                                      surveymonkey.com/r/python_typi

                                                                                                                                                                                                                                                                      This survey was developed with support from the Pyrefly team at Meta, the PyCharm team at JetBrains, the Python team at Microsoft, and the typing community on discourse.python.org.

                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                        Python Tip #217 (of 365):

                                                                                                                                                                                                                                                                        Think in terms of the minimum viable duck.

                                                                                                                                                                                                                                                                        In other words: "what's the least this object needs to do to work in this context?"

                                                                                                                                                                                                                                                                        For example, csv.reader is usually given a file object... but it accepts ANY iterable of delimited lines:

                                                                                                                                                                                                                                                                        >>> import csv
                                                                                                                                                                                                                                                                        >>> rows = ['a,b,c', '1,2,3']
                                                                                                                                                                                                                                                                        >>> list(csv.reader(rows))
                                                                                                                                                                                                                                                                        [['a', 'b', 'c'], ['1', '2', '3']]

                                                                                                                                                                                                                                                                        🧵 (1/4)

                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                          Peter's PEP 797 – Shared Object Proxies was also the first PEP rejected for 3.16 as well! ✌️
                                                                                                                                                                                                                                                                          peps.python.org/pep-0797/

                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                            Forget Python 3.15 (don't forget it, please test!), the first PEP for Python 3.16 has been accepted:

                                                                                                                                                                                                                                                                            PEP 828 – Supporting ‘yield from’ in asynchronous generators, by Peter Bierma

                                                                                                                                                                                                                                                                            peps.python.org/pep-0828/

                                                                                                                                                                                                                                                                              [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                              @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                              🎉 Karen Tracey is a DjangoCon US 2026 keynote speaker!

                                                                                                                                                                                                                                                                              A longtime Django core developer, Karen will present "Django 6: The Most Exciting Release Ever?" and explore the exciting new features coming in Django 6.

                                                                                                                                                                                                                                                                              Read more: 2026.djangocon.us/news/keynote

                                                                                                                                                                                                                                                                                [?]Jesus Michał von Gentoo 🏔 (he) » 🌐
                                                                                                                                                                                                                                                                                @mgorny@social.treehouse.systems

                                                                                                                                                                                                                                                                                Me after laboriously backporting 3.15 fixes to 6.0.x in : "oh, nice, the patchset applies cleanly to 5.2.x as well."

                                                                                                                                                                                                                                                                                And today, I have to laboriously backport another patch to 6.0.x, and it turns out the backport doesn't apply cleanly to 5.2.x, so I have to laboriously backport it there as well.

                                                                                                                                                                                                                                                                                I honestly *hate* Django Python version support policy. Shifting all the burden downstream.

                                                                                                                                                                                                                                                                                  [?]Marcos Dione » 🌐
                                                                                                                                                                                                                                                                                  @mdione@en.osm.town

                                                                                                                                                                                                                                                                                  TIL that 's `pathlib.Path` is expensive compared to plain `str`ings. I tested by `.walk()`ing a 2 level directory structure with 40M files and it took 9m. When I tried with `os.walk()`, it only took 1m. Of course, I tested this several times to avoid cold vs hot cache.

                                                                                                                                                                                                                                                                                  Tritium#python@libera.chat tracked it down to the constructor to `pathlib.Path`, which does a lot of things than being just a `str`:

                                                                                                                                                                                                                                                                                  github.com/python/cpython/blob

                                                                                                                                                                                                                                                                                    [?]baconandcoconut » 🌐
                                                                                                                                                                                                                                                                                    @baconandcoconut@freeradical.zone

                                                                                                                                                                                                                                                                                    What's the weirdest or nerdiest or most niche thing you use for? I love hearing people's stories and I love sharing how wide the set of use cases is.

                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                      Python Tip #216 (of 365):

                                                                                                                                                                                                                                                                                      In Python, we often care more about the behavior of an object than its type.

                                                                                                                                                                                                                                                                                      We say "if it looks like a duck and quacks like a duck, it's a duck".

                                                                                                                                                                                                                                                                                      When we check for duckness, we don't test DNA, we observe behavior.

                                                                                                                                                                                                                                                                                      Instead of asking "what TYPE can I use here?", ask "does my object have the BEHAVIOR that's expected here?"

                                                                                                                                                                                                                                                                                      🧵 (1/3)

                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                        Some things sooner than others:

                                                                                                                                                                                                                                                                                        3.15 RC 1 is out, but we'll wait until tomorrow to do 3.13 and 3.14 so we can include this fix for macOS that will become a problem in mid-September:

                                                                                                                                                                                                                                                                                        github.com/python/cpython/issu

                                                                                                                                                                                                                                                                                        3.15 will have another release (1st Sept) before then, but 3.13 and 3.14's next one is in October, so better wait for the fix.

                                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                          🐍🚀 Out now: Python 3.15 release candidate 1!

                                                                                                                                                                                                                                                                                          Please test and report bugs!

                                                                                                                                                                                                                                                                                          We strongly encourage maintainers of to prepare their projects for 3.15 during this phase, and publish Python 3.15 wheels on PyPI to be ready for the final release of 3.15.0, and to help other projects do their own testing.

                                                                                                                                                                                                                                                                                          Any binary wheels built against Python 3.15.0 release candidates will work with future versions of Python 3.15.

                                                                                                                                                                                                                                                                                          discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                            [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                            @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                            The nomination period for the PSF Board and Python Packaging Council elections is open now, closing next Tuesday, August 11th, 2:00 pm UTC 📝🐍 Don't wait until the last minute, though! Nominate yourself or someone else today: python.org/nominations/electio

                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                              🔒🐍 Coming soon, Python 3.15 release candidate 1! The 3.15 branch is now locked until 3.15.0 final in October.
                                                                                                                                                                                                                                                                                              discuss.python.org/t/the-3-15-

                                                                                                                                                                                                                                                                                              Also coming soon: Python 3.13.15 and 3.14.7.
                                                                                                                                                                                                                                                                                              hugovk.dev/next-release/

                                                                                                                                                                                                                                                                                                [?]Kushal Das :python: :tor: 🇸🇪 » 🌐
                                                                                                                                                                                                                                                                                                @kushal@toots.dgplug.org

                                                                                                                                                                                                                                                                                                Jag har också en kurs som hjälper Scratch-generationen att ta steget över till genom den välbekanta miljön. Kursen innehåller även grundläggande hårdvaruprogrammering för att göra inlärningen rolig. Kurserna startar i slutet av augusti. Dela gärna så att fler föräldrar får se detta.

                                                                                                                                                                                                                                                                                                enkelkod.se/beginner.html

                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                  Python Tip #215 (of 365):

                                                                                                                                                                                                                                                                                                  Know what it means to be a "sequence" in Python.

                                                                                                                                                                                                                                                                                                  Lists, strings, and tuples are all sequences:

                                                                                                                                                                                                                                                                                                  >>> fruits = ["apple", "lemon", "pear"]
                                                                                                                                                                                                                                                                                                  >>> coordinates = (1, 8, 2)
                                                                                                                                                                                                                                                                                                  >>> greeting = "Hi y'all!"

                                                                                                                                                                                                                                                                                                  A sequence is an ordered collection that:

                                                                                                                                                                                                                                                                                                  1. Has a length
                                                                                                                                                                                                                                                                                                  2. Can be indexed from "0" up to one less than its length
                                                                                                                                                                                                                                                                                                  3. Can be looped over

                                                                                                                                                                                                                                                                                                  >>> len(fruits)
                                                                                                                                                                                                                                                                                                  3
                                                                                                                                                                                                                                                                                                  >>> fruits[0]
                                                                                                                                                                                                                                                                                                  'apple'
                                                                                                                                                                                                                                                                                                  >>> for c in coordinates: print(c)
                                                                                                                                                                                                                                                                                                  1
                                                                                                                                                                                                                                                                                                  8
                                                                                                                                                                                                                                                                                                  2

                                                                                                                                                                                                                                                                                                  🧵 (1/3)

                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                    “The defaultdict is very handy, but I find that it's rarely useful enough that I feel the need to use it.”

                                                                                                                                                                                                                                                                                                    Read more 👉 pym.dev/default-dictionary-val

                                                                                                                                                                                                                                                                                                      [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                      @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                      ✍️ New post demonstrating the runtime advantage of my package time-machine over its inspiration, freezegun.

                                                                                                                                                                                                                                                                                                      adamj.eu/tech/2026/08/03/pytho

                                                                                                                                                                                                                                                                                                        [?]Juhis » 🌐
                                                                                                                                                                                                                                                                                                        @hamatti@mastodon.world

                                                                                                                                                                                                                                                                                                        B is for batteries included

                                                                                                                                                                                                                                                                                                        Python comes with batteries included — meaning it has a fantastic, powerful standard library. Two years ago, I spent an entire August writing about my favourite parts of it.

                                                                                                                                                                                                                                                                                                        hamatti.org/posts/b-is-for-bat

                                                                                                                                                                                                                                                                                                          [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                          @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                          📣 New to DjangoCon US Contribution Sprints?

                                                                                                                                                                                                                                                                                                          Our latest blog covers everything you need to get started from understanding sprints to setting up your development environment before you arrive.

                                                                                                                                                                                                                                                                                                          2026.djangocon.us/news/sprints

                                                                                                                                                                                                                                                                                                            [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                            @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                            21 days until DjangoCon US! 🎉

                                                                                                                                                                                                                                                                                                            Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                                                                                                                                                                                                                            📅 2026.djangocon.us/

                                                                                                                                                                                                                                                                                                              [?]Juhis » 🌐
                                                                                                                                                                                                                                                                                                              @hamatti@mastodon.world

                                                                                                                                                                                                                                                                                                              A is for assert

                                                                                                                                                                                                                                                                                                              assert is handy built-in in Python that can be used as a failsafe for scripts and for writing tests with pytest.

                                                                                                                                                                                                                                                                                                              hamatti.org/posts/a-is-for-ass

                                                                                                                                                                                                                                                                                                                [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                ✍️ time-machine 3.3.0 is out, with Python 3.15 support, performance improvements, subinterpreter support, and various bug fixes.

                                                                                                                                                                                                                                                                                                                Check it out, and if you’re using freezegun, try the updated Migration CLI to convert and speed up your tests.

                                                                                                                                                                                                                                                                                                                adamj.eu/tech/2026/07/31/pytho

                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                  RE: fosstodon.org/@adamchainz/1170

                                                                                                                                                                                                                                                                                                                  "Wheels are also now built with frame pointers enabled, per the PEP 831 change in Python 3.15. Frame pointers are a debugging feature for low-level languages like C, which allow debuggers to reconstruct the call stack of a program. Python has decided to enable frame pointers by default and encourage the ecosystem to do so as well, to make debugging easier for us all, so time-machine is joining the party."

                                                                                                                                                                                                                                                                                                                  Enabled by default for 3.15, do this for older versions:

                                                                                                                                                                                                                                                                                                                  github.com/adamchainz/time-mac

                                                                                                                                                                                                                                                                                                                  [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                  @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                  ✍️ time-machine 3.3.0 is out, with Python 3.15 support, performance improvements, subinterpreter support, and various bug fixes.

                                                                                                                                                                                                                                                                                                                  Check it out, and if you’re using freezegun, try the updated Migration CLI to convert and speed up your tests.

                                                                                                                                                                                                                                                                                                                  adamj.eu/tech/2026/07/31/pytho

                                                                                                                                                                                                                                                                                                                      AodeRelay boosted

                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                      Python Tip #214 (of 365):

                                                                                                                                                                                                                                                                                                                      Use truthiness for integers with caution.

                                                                                                                                                                                                                                                                                                                      I DO rely on truthiness checks for integers, but not always. I would recommend only using them when they seem to improve readability.

                                                                                                                                                                                                                                                                                                                      I find this:
                                                                                                                                                                                                                                                                                                                      if hours: ...

                                                                                                                                                                                                                                                                                                                      More readable than this:
                                                                                                                                                                                                                                                                                                                      if hours > 0: ...

                                                                                                                                                                                                                                                                                                                      But I find this:
                                                                                                                                                                                                                                                                                                                      if number % 2 != 0: ...

                                                                                                                                                                                                                                                                                                                      More readable than this:
                                                                                                                                                                                                                                                                                                                      if number % 2: ...

                                                                                                                                                                                                                                                                                                                      🧵 (1/2)

                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                        The German translation of the Python docs is being restarted. Want to help out? Get in touch with Swen!

                                                                                                                                                                                                                                                                                                                        discuss.python.org/t/starting-

                                                                                                                                                                                                                                                                                                                          [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                          @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                          What does it take to help lead Django?

                                                                                                                                                                                                                                                                                                                          DSF President Thibaud Colas shares insights on open-source leadership, community, sustainability, and contributing to Django in this DjangoCon US Insights & Perspectives interview.

                                                                                                                                                                                                                                                                                                                          🎥 youtu.be/6rTd8IRwNWY?si=V15prr

                                                                                                                                                                                                                                                                                                                            [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                            @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                            We're excited to welcome Caktus Group as a sponsor of Django Girls Chicago 2026! 🎉
                                                                                                                                                                                                                                                                                                                            Their support helps make this free Django workshop possible and empowers more women in tech. Thank you! 💚

                                                                                                                                                                                                                                                                                                                              Dryusdan boosted

                                                                                                                                                                                                                                                                                                                              [?]Fabien LOISON (FLOZz) » 🌐
                                                                                                                                                                                                                                                                                                                              @FLOZz@mastodon.social

                                                                                                                                                                                                                                                                                                                              🚀 I just released rst2gemtext v0.7.0!

                                                                                                                                                                                                                                                                                                                              It is a library and a CLI tool to convert reStructuredText to Gemtext (Gemini markup format).

                                                                                                                                                                                                                                                                                                                              ➡️ github.com/flozz/rst2gemtext/r

                                                                                                                                                                                                                                                                                                                              This version adds support for the Docutils' csv-table and list-table directives. Thank you @Dryusdan to make me know about them! 😁

                                                                                                                                                                                                                                                                                                                                Wolf boosted

                                                                                                                                                                                                                                                                                                                                [?]input » 🌐
                                                                                                                                                                                                                                                                                                                                @feed@igeek.gamer-geek-news.com

                                                                                                                                                                                                                                                                                                                                📰 New GitHub, PyPI Policies Hope to Boost Supply Chain Security

                                                                                                                                                                                                                                                                                                                                "GitHub and the Python Package Index (PyPI) have introduced new policies meant to boost supply chain security," reports SecurityWeek, "by preventing the fast propagation of poisoned package version...

                                                                                                                                                                                                                                                                                                                                📰 Source: Slashdot
                                                                                                                                                                                                                                                                                                                                🔗 Link: https://developers.slashdot.org/story/26/08/01/0511237/new-github-pypi-policies-hope-to-boost-supply-chain-security?utm_source=rss1.0mainlinkanon&utm_medium=feed

                                                                                                                                                                                                                                                                                                                                #Python #AI #ArtificialIntelligence

                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                  Oh look, a new version of Delorean, the datetime enhancement library, has been released after just eight years:
                                                                                                                                                                                                                                                                                                                                  github.com/myusuf3/delorean/is 🚀🕒

                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                    Python Tip #213 (of 365):

                                                                                                                                                                                                                                                                                                                                    Replace "or"-chained equality comparisons with a containment check.

                                                                                                                                                                                                                                                                                                                                    Instead of this:

                                                                                                                                                                                                                                                                                                                                    is_vowel = c == "a" or c == "e" or c == "i" or c == "o" or c == "u"

                                                                                                                                                                                                                                                                                                                                    You can write this:

                                                                                                                                                                                                                                                                                                                                    is_vowel = c in ("a", "e", "i", "o", "u")

                                                                                                                                                                                                                                                                                                                                    In fact, you could even give that tuple a name:

                                                                                                                                                                                                                                                                                                                                    vowels = ("a", "e", "i", "o", "u")
                                                                                                                                                                                                                                                                                                                                    is_vowel = c in vowels

                                                                                                                                                                                                                                                                                                                                    🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                      [?]gyptazy » 🌐
                                                                                                                                                                                                                                                                                                                                      @gyptazy@gyptazy.com

                                                                                                                                                                                                                                                                                                                                      just got released in v1.0 and is out of beta now!

                                                                                                                                                                                                                                                                                                                                      PegaProx for VE and clusters made a huge step and is finally out of beta!

                                                                                                                                                                                                                                                                                                                                      The first stable release also comes around with companies providing enterprise support. If you need SLA-backed help running PegaProx in production (or training sessions) you can now find a support partner at:

                                                                                                                                                                                                                                                                                                                                      Enterprise Support & Sponsors: https://pegaprox.com/sponsors.html
                                                                                                                                                                                                                                                                                                                                      Release: https://github.com/PegaProx/project-pegaprox/releases/tag/v1.0
                                                                                                                                                                                                                                                                                                                                      Website: https://pegaprox.com


                                                                                                                                                                                                                                                                                                                                      PegaProx v1.0 Release

                                                                                                                                                                                                                                                                                                                                      Alt...PegaProx v1.0 Release

                                                                                                                                                                                                                                                                                                                                        [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                        @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                        We're excited to welcome Prairie Postgres as a sponsor of Django Girls Chicago 2026! 🎉

                                                                                                                                                                                                                                                                                                                                        Their support helps make this free, hands-on Django workshop possible, empowering more women to learn web development in a welcoming community.

                                                                                                                                                                                                                                                                                                                                        Thank you for investing in the next generation of Django developers! 💚

                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                          “In order to use a for loop, you must have an iterable to loop over.”

                                                                                                                                                                                                                                                                                                                                          Read more 👉 pym.dev/while-loops/

                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                            "Or we could use the zip function with the strict=True argument to compare line-by-line in a for loop"

                                                                                                                                                                                                                                                                                                                                            Read more 👉 trey.io/0frqkp

                                                                                                                                                                                                                                                                                                                                              [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                              @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                              ✍️ time-machine 3.3.0 is out, with Python 3.15 support, performance improvements, subinterpreter support, and various bug fixes.

                                                                                                                                                                                                                                                                                                                                              Check it out, and if you’re using freezegun, try the updated Migration CLI to convert and speed up your tests.

                                                                                                                                                                                                                                                                                                                                              adamj.eu/tech/2026/07/31/pytho

                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                Python Tip #212 (of 365):

                                                                                                                                                                                                                                                                                                                                                Use any() and all() to check a condition across every item in an iterable

                                                                                                                                                                                                                                                                                                                                                This:

                                                                                                                                                                                                                                                                                                                                                any_negative = False
                                                                                                                                                                                                                                                                                                                                                for n in numbers:
                                                                                                                                                                                                                                                                                                                                                if n < 0:
                                                                                                                                                                                                                                                                                                                                                any_negative = True
                                                                                                                                                                                                                                                                                                                                                break

                                                                                                                                                                                                                                                                                                                                                Can be replaced with:

                                                                                                                                                                                                                                                                                                                                                any_negative = any(n < 0 for n in numbers)

                                                                                                                                                                                                                                                                                                                                                And this:

                                                                                                                                                                                                                                                                                                                                                all_good = True
                                                                                                                                                                                                                                                                                                                                                for item in iterable:
                                                                                                                                                                                                                                                                                                                                                if not condition(item):
                                                                                                                                                                                                                                                                                                                                                all_good = False
                                                                                                                                                                                                                                                                                                                                                break

                                                                                                                                                                                                                                                                                                                                                Can be replaced with:

                                                                                                                                                                                                                                                                                                                                                all_good = all(condition(item) for item in iterable)

                                                                                                                                                                                                                                                                                                                                                🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                all_good = True
for item in iterable:
    if not condition(item):
        all_good = False
        break

Can be rewritten as:

all_good = all(
    condition(item)
    for item in iterable
)

Also...

any_good = False
for item in iterable:
    if condition(item):
        any_good = True
        break

Can be rewritten as:

any_good = any(
    condition(item)
    for item in iterable
)

                                                                                                                                                                                                                                                                                                                                                Alt...all_good = True for item in iterable: if not condition(item): all_good = False break Can be rewritten as: all_good = all( condition(item) for item in iterable ) Also... any_good = False for item in iterable: if condition(item): any_good = True break Can be rewritten as: any_good = any( condition(item) for item in iterable )

                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                  Did you know that map()/filter() were added to Python 6 years before comprehensions?

                                                                                                                                                                                                                                                                                                                                                  Also range() was added 9 years before zip() which was added 3 years before enumerate().

                                                                                                                                                                                                                                                                                                                                                  And strings methods weren't methods for the first 9 years... they lived in the string module!

                                                                                                                                                                                                                                                                                                                                                  For years I've wanted an easier way to look up facts like those.

                                                                                                                                                                                                                                                                                                                                                  Now I have a way! pym.dev/since

                                                                                                                                                                                                                                                                                                                                                  It's also available as a CLI tool via PyPI

                                                                                                                                                                                                                                                                                                                                                  uvx sincewhen 'sum()'

                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                    🐍🚀 Out now: Tablib 3.10.0

                                                                                                                                                                                                                                                                                                                                                    The format-agnostic tabular dataset library

                                                                                                                                                                                                                                                                                                                                                    🔒 Security fix to escape dataset title in HTML serialisation
                                                                                                                                                                                                                                                                                                                                                    🦥 Support for Python 3.15 with lazy imports
                                                                                                                                                                                                                                                                                                                                                    💧 Drop support for EOL Python 3.9
                                                                                                                                                                                                                                                                                                                                                    🩹 And a bunch of fixes

                                                                                                                                                                                                                                                                                                                                                    github.com/jazzband/tablib/rel

                                                                                                                                                                                                                                                                                                                                                      [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                      @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                      Thinking about nominating yourself or someone else for the upcoming PSF Board or Python Packaging Council elections? Now's your chance: take a couple minutes this weekend to submit a nomination!
                                                                                                                                                                                                                                                                                                                                                      python.org/nominations/electio

                                                                                                                                                                                                                                                                                                                                                        [?]Django News » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                        @djangonews@mastodon.social

                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                        Using super()[key] won't work because the super class doesn't implement a __getitem__ method, but looking up the __getitem__ attribute on a super() object does work (assuming a parent class implements that method).

                                                                                                                                                                                                                                                                                                                                                        Read more 👉 trey.io/p0h32w

                                                                                                                                                                                                                                                                                                                                                          [?]AI6YR Ben » 🌐
                                                                                                                                                                                                                                                                                                                                                          @ai6yr@m.ai6yr.org

                                                                                                                                                                                                                                                                                                                                                          Great, now the AI is throwing malware into python libraries, too.

                                                                                                                                                                                                                                                                                                                                                          Anthropic's Claude breached 3 orgs, uploaded PyPI malware during tests

                                                                                                                                                                                                                                                                                                                                                          bleepingcomputer.com/news/secu

                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                            Python Tip #211 (of 365):

                                                                                                                                                                                                                                                                                                                                                            Consider how your Boolean expressions read in English

                                                                                                                                                                                                                                                                                                                                                            For example, you could write "10 > x" or you could write "x < 10".

                                                                                                                                                                                                                                                                                                                                                            They check the same thing, but I find the latter one more readable.

                                                                                                                                                                                                                                                                                                                                                            Steve McConnell's Code Complete recommends writing numeric tests in "number-line order": order the values left to right, from smallest to largest.

                                                                                                                                                                                                                                                                                                                                                            Follow that rule and you'll always use < and <=, never > and >=.

                                                                                                                                                                                                                                                                                                                                                            I don't follow that advice...

                                                                                                                                                                                                                                                                                                                                                            🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                              What's New in Python 3.15:

                                                                                                                                                                                                                                                                                                                                                              csv

                                                                                                                                                                                                                                                                                                                                                              * csv.Sniffer.sniff() delimiter detection is now up to 1.6x faster. (Contributed by Maurycy Pawłowski-Wieroński.)

                                                                                                                                                                                                                                                                                                                                                              docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                                                                                                                                                [?]Jesus Michał von Gentoo 🏔 (he) » 🌐
                                                                                                                                                                                                                                                                                                                                                                @mgorny@social.treehouse.systems

                                                                                                                                                                                                                                                                                                                                                                Zero days since added a random new functionality that depends on pip being entirely standalone and breaks when you unbundle the dependencies. And I'm unable to figure out why a bunch of tests are still failing.

                                                                                                                                                                                                                                                                                                                                                                EDIT: I'd appreciate some help with that. My WIP is at codeberg.org/gentoo/gentoo/pul.

                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                  Finding an item in a sorted list of 10 million things:

                                                                                                                                                                                                                                                                                                                                                                  ✅ Binary search: 23 comparisons
                                                                                                                                                                                                                                                                                                                                                                  ❌ The `in` operator: 2+ million comparisons

                                                                                                                                                                                                                                                                                                                                                                  Python's bisect module does binary search for you. New article, with recipes for closest-match and range lookups:

                                                                                                                                                                                                                                                                                                                                                                  pym.dev/binary-search/

                                                                                                                                                                                                                                                                                                                                                                    Clyde 🦣 boosted

                                                                                                                                                                                                                                                                                                                                                                    [?]Dalibo » 🌐
                                                                                                                                                                                                                                                                                                                                                                    @dalibo@mastodon.online

                                                                                                                                                                                                                                                                                                                                                                    JOB : nous recrutons un développeur / une développeuse backend.

                                                                                                                                                                                                                                                                                                                                                                    Découvrez le poste et les compétences requises, ainsi que les avantages à travailler chez Dalibo : télétravail, coopérative, grille salariale transparente… => blog.dalibo.com/2026/07/30/dev





                                                                                                                                                                                                                                                                                                                                                                    visuel promo du recrutement chez Dalibo

                                                                                                                                                                                                                                                                                                                                                                    Alt...visuel promo du recrutement chez Dalibo

                                                                                                                                                                                                                                                                                                                                                                    [?]Seth Larson » 🌐
                                                                                                                                                                                                                                                                                                                                                                    @sethmlarson@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                    The Python Software Foundation is hiring a Security Developer to join @miketheman and I on triaging vulnerability reports and mitigating malware published to PyPI.

                                                                                                                                                                                                                                                                                                                                                                    If you've got experience with Python, security, and collaborating with open source projects then we'd love to hear from you:

                                                                                                                                                                                                                                                                                                                                                                    jobs.pyfound.org/apply/ei03ut6

                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                      Lots of new stuff in pip 26.2:

                                                                                                                                                                                                                                                                                                                                                                      🍊 Support for Python 3.15
                                                                                                                                                                                                                                                                                                                                                                      🍊 Selecting only dependencies
                                                                                                                                                                                                                                                                                                                                                                      🍊 Experimental: venv based build isolation
                                                                                                                                                                                                                                                                                                                                                                      🍊 Faster repeated resolves by caching index simple responses
                                                                                                                                                                                                                                                                                                                                                                      🍊 No more progress bar spam in CI
                                                                                                                                                                                                                                                                                                                                                                      🍊 Deprecation to remove the legacy dependency resolver (--use-deprecated=legacy-resolver)

                                                                                                                                                                                                                                                                                                                                                                      See @ichard26's post for more!

                                                                                                                                                                                                                                                                                                                                                                      sichard.ca/blog/2026/07/whats-

                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                        For checking whether any items match a more complex condition, we could use the built-in any() or all functions

                                                                                                                                                                                                                                                                                                                                                                        Read more 👉 trey.io/xtql6h

                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                          Python Tip #210 (of 365):

                                                                                                                                                                                                                                                                                                                                                                          Instead of an "if" under an "else", consider using "elif".

                                                                                                                                                                                                                                                                                                                                                                          You likely know about Python's "elif" statement, but you might occasionally underuse it.

                                                                                                                                                                                                                                                                                                                                                                          If you find yourself writing an "if" statement just under an "else", ask "should I use an "elif" here instead?"

                                                                                                                                                                                                                                                                                                                                                                          🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                            [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                            @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                            Thinking about your first DjangoCon US?

                                                                                                                                                                                                                                                                                                                                                                            Jake Atwell shares his experience as a first-time attendee, why the community stood out, and why volunteering is a great way to get involved.

                                                                                                                                                                                                                                                                                                                                                                            🎥 youtube.com/watch?v=GgTVi0UsvUg

                                                                                                                                                                                                                                                                                                                                                                              [?]Lobsters » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                              @lobsters@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                              xy is very fast and customizable charting library for Python lobste.rs/s/vnfk4x
                                                                                                                                                                                                                                                                                                                                                                              github.com/reflex-dev/xy

                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                New Python Morsels article: Binary search with the bisect module 🔍

                                                                                                                                                                                                                                                                                                                                                                                You don't need to implement binary search yourself. Python's bisect module already did it for you.

                                                                                                                                                                                                                                                                                                                                                                                In this article:

                                                                                                                                                                                                                                                                                                                                                                                🎯 An interactive guessing game that demonstrates binary search
                                                                                                                                                                                                                                                                                                                                                                                ⚡ Why 10 million items take just 23 comparisons
                                                                                                                                                                                                                                                                                                                                                                                🤔 Why a set or dict can't always replace binary search
                                                                                                                                                                                                                                                                                                                                                                                🧰 Recipes: closest match, first/last match, all values in a range

                                                                                                                                                                                                                                                                                                                                                                                pym.dev/binary-search/

                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                  What's New in Python 3.15:

                                                                                                                                                                                                                                                                                                                                                                                  contextlib

                                                                                                                                                                                                                                                                                                                                                                                  * Added support for arbitrary descriptors __enter__(), __exit__(), __aenter__(), and __aexit__() in ExitStack and contextlib.AsyncExitStack, for consistency with the `with` and `async with` statements.

                                                                                                                                                                                                                                                                                                                                                                                  * ContextDecorator and AsyncContextDecorator now detect generator functions, coroutine functions, and asynchronous generator functions and keep the context manager open across iteration or await.

                                                                                                                                                                                                                                                                                                                                                                                  docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                                                                                                                                                                    [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                    @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                    26 days until DjangoCon US! 🎉

                                                                                                                                                                                                                                                                                                                                                                                    Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                                                                                                                                                                                                                                                                                                    📅 2026.djangocon.us/

                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                      I've recently been updating many of my mini helper apps and I made a page for them: pythonmorsels.com/tools/

                                                                                                                                                                                                                                                                                                                                                                                      Note that the strptime & format tools now link to CLI versions (strptime-cli & fguess) and the pastebin & REPL tool recently got a big rework.

                                                                                                                                                                                                                                                                                                                                                                                      Have thoughts on one of these tools? Or an idea for another one? I'd love to hear either!

                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                        Python Tip #209 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                        Remember Python's "inline ifs"

                                                                                                                                                                                                                                                                                                                                                                                        Python doesn't have traditional ternary operators (cond ? one : two) but instead has an inline "if" expression (technically a "conditional expression") for the same purpose.

                                                                                                                                                                                                                                                                                                                                                                                        Instead of:

                                                                                                                                                                                                                                                                                                                                                                                        if amount == 1:
                                                                                                                                                                                                                                                                                                                                                                                        noun = "item"
                                                                                                                                                                                                                                                                                                                                                                                        else:
                                                                                                                                                                                                                                                                                                                                                                                        noun = "items"

                                                                                                                                                                                                                                                                                                                                                                                        We can write

                                                                                                                                                                                                                                                                                                                                                                                        noun = "item" if amount == 1 else "items"

                                                                                                                                                                                                                                                                                                                                                                                        The condition is in the MIDDLE. The first value is the "true" case and the last is the "false" case.

                                                                                                                                                                                                                                                                                                                                                                                        🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                          [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                          @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                          The conference hotel rate won't last forever!

                                                                                                                                                                                                                                                                                                                                                                                          Book your DjangoCon US hotel before August 3, 2026 to take advantage of the discounted conference rate.

                                                                                                                                                                                                                                                                                                                                                                                          🏨 2026.djangocon.us

                                                                                                                                                                                                                                                                                                                                                                                            [?]codingjoe :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                            @codingjoe@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                            Usually a quick chore, but with the feature update, an unexpected ton of work…

                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                              🪟🦾🥈 Windows on Arm (aka aarch64-pc-windows-msvc) has now been promoted to tier 2 of CPython platform support.

                                                                                                                                                                                                                                                                                                                                                                                              Tier 3 has no response SLA to failures. Tier 2 requires breaking changes to be fixed or reverted within 24 hours, and failures block a release.

                                                                                                                                                                                                                                                                                                                                                                                              Tier 3 requires at least one core team member signed up to support the platform. Tier 2 requires at least two, and we have three here.

                                                                                                                                                                                                                                                                                                                                                                                              peps.python.org/pep-0011/

                                                                                                                                                                                                                                                                                                                                                                                                [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                🎉 We're excited to announce Sarah Boyce as a keynote speaker!

                                                                                                                                                                                                                                                                                                                                                                                                As a Django Fellow, Sarah helps maintain Django and support its global community. Her keynote will explore code review, feedback, and building stronger open source communities.

                                                                                                                                                                                                                                                                                                                                                                                                2026.djangocon.us/news/keynote

                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                  Python Tip #208 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                  Break up long boolean expressions

                                                                                                                                                                                                                                                                                                                                                                                                  Have a long condition in your "if" statement?

                                                                                                                                                                                                                                                                                                                                                                                                  You could:

                                                                                                                                                                                                                                                                                                                                                                                                  1. Wrap it in parentheses to break it up over multiple lines
                                                                                                                                                                                                                                                                                                                                                                                                  2. Use variables to give names to each sub-expression
                                                                                                                                                                                                                                                                                                                                                                                                  3. Use functions to name sub-expressions

                                                                                                                                                                                                                                                                                                                                                                                                  🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                    [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                    @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                    What makes DjangoCon US special?

                                                                                                                                                                                                                                                                                                                                                                                                    Yumiko Siewenie shares her first DjangoCon experience, why the community stood out, and how even puzzles became a way to meet new people.

                                                                                                                                                                                                                                                                                                                                                                                                    🎥youtu.be/Z0Bv3-gOQLg?si=WsNn9c

                                                                                                                                                                                                                                                                                                                                                                                                      [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                      @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                      ✍️ New post on a Python testing technique: inspecting interleaved calls across multiple mocks with attached mocks.

                                                                                                                                                                                                                                                                                                                                                                                                      adamj.eu/tech/2026/07/27/pytho

                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                        “Sets are also great when you need fast containment checks.”

                                                                                                                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/practical-uses-of-sets/

                                                                                                                                                                                                                                                                                                                                                                                                          [?]Linux Professional Institute » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                          @LPI@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                          Some remain widely used for decades, while others fulfill an important role during their time before receding.

                                                                                                                                                                                                                                                                                                                                                                                                          Our author Andrew Oram explores the stories of C, C++, C#, , , , , , , , and others. Dive into it 👇
                                                                                                                                                                                                                                                                                                                                                                                                          lpi.org/xq3f

                                                                                                                                                                                                                                                                                                                                                                                                            [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                            @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                            Please congratulate our newest PSF Fellow Members for Q2, 2026! Their continued contributions to the Python ecosystem are so very important to our community.
                                                                                                                                                                                                                                                                                                                                                                                                            pyfound.blogspot.com/2026/07/a

                                                                                                                                                                                                                                                                                                                                                                                                              [?]pvergain (framapiaf) » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                              @pvergain@framapiaf.org

                                                                                                                                                                                                                                                                                                                                                                                                              wsvincent.com/deploying-web-ap (Deploying Web Apps in 2026: My EuroPython 2026 Conference Talk by Will Vincent )

                                                                                                                                                                                                                                                                                                                                                                                                              --<--
                                                                                                                                                                                                                                                                                                                                                                                                              This is the text version of my EuroPython talk, Deploying Python Web Apps in 2026, which I recently presented in Krakow, Poland.

                                                                                                                                                                                                                                                                                                                                                                                                              I will add the video version when it it is ready in a few weeks. The EuroPython team traditionally does an amazing job making the talks available shortly after the conference.
                                                                                                                                                                                                                                                                                                                                                                                                              -->--

                                                                                                                                                                                                                                                                                                                                                                                                                [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                27 days until DjangoCon US! 🎉

                                                                                                                                                                                                                                                                                                                                                                                                                Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                                                                                                                                                                                                                                                                                                                                📅 2026.djangocon.us/

                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                  @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                  The PSF is hiring a Security Developer! Help triage vulnerabilities in CPython, fight malware/supply-chain attacks on PyPI, and build tools to keep the ecosystem safe for millions of users 🐍🔒 This is a global, remote, 1 year term role, with the possibility of renewal.

                                                                                                                                                                                                                                                                                                                                                                                                                  Apply today:
                                                                                                                                                                                                                                                                                                                                                                                                                  pythonsoftwarefoundation.apply

                                                                                                                                                                                                                                                                                                                                                                                                                    [?]andros » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                    @andros@activity.andros.dev

                                                                                                                                                                                                                                                                                                                                                                                                                    «Modern email can be built from borrowed parts»

                                                                                                                                                                                                                                                                                                                                                                                                                    What if we designed the successor to email on top of HTTP, fixing 40 years of SMTP design flaws using only technologies that already exist?

                                                                                                                                                                                                                                                                                                                                                                                                                    https://en.andros.dev/blog/d7ed8b07/modern-email-can-be-built-from-borrowed-parts/

                                                                                                                                                                                                                                                                                                                                                                                                                    #Email #ActivityPub #OpenWeb #Python

                                                                                                                                                                                                                                                                                                                                                                                                                      [?]rixx » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                      @rixx@chaos.social

                                                                                                                                                                                                                                                                                                                                                                                                                      I did not realise I had strong feelings on docstrings. I use them sparingly, and while they are a hack, at least they serve a good purpose.

                                                                                                                                                                                                                                                                                                                                                                                                                      I know people have opinions on the placement of line breaks and quotes, but I thought I was above these things. That this was Python programmers yearning for curly-brace level style wars.

                                                                                                                                                                                                                                                                                                                                                                                                                      I was mistaken.

                                                                                                                                                                                                                                                                                                                                                                                                                      I just encountered docstrings written in regular quotes rather than triple quotes and, no, apparently I DO have strong feelings on docstrings.

                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                        Python Tip #207 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                        Get fancy with your subprocess‍.run calls.

                                                                                                                                                                                                                                                                                                                                                                                                                        When launching a subprocess, consider passing the keyword arguments capture_output, text, and check to subprocess‍.run.

                                                                                                                                                                                                                                                                                                                                                                                                                        Passing capture_output=True will capture both stdout & stderr from the subprocess.

                                                                                                                                                                                                                                                                                                                                                                                                                        Passing text=True will decode the captured output into strings (instead of providing raw bytes).

                                                                                                                                                                                                                                                                                                                                                                                                                        Passing check=True will raise an exception if the subprocess exited with an error code.

                                                                                                                                                                                                                                                                                                                                                                                                                        🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Farhan Ali Raza » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                          @farhanaliraza@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                          The new django-bolt==0.10.0a1 is the fastest python framework. I can confidently say it now because before it was near litestar level. 6x performance of FastAPI.
                                                                                                                                                                                                                                                                                                                                                                                                                          /db clearly wins. Pagination wins after `sync_to_thread`. So only db is close. Frameowrk level overhead bolt is way ahead.

                                                                                                                                                                                                                                                                                                                                                                                                                          Code used github.com/huynguyengl99/pytho
                                                                                                                                                                                                                                                                                                                                                                                                                          On repo they still use 0.4.7 version.

                                                                                                                                                                                                                                                                                                                                                                                                                            [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                            @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                            28 days until DjangoCon US! 🎉

                                                                                                                                                                                                                                                                                                                                                                                                                            Chicago is calling. We can't wait to welcome the Django community for a week of talks, tutorials, sprints, and connection.

                                                                                                                                                                                                                                                                                                                                                                                                                            📅 2026.djangocon.us/

                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                              Now we have pymanager for Windows, Python 3.16 drops the old MSI-based installer.

                                                                                                                                                                                                                                                                                                                                                                                                                              Here's Steve Dower's +389 -17,781 PR! 🧹

                                                                                                                                                                                                                                                                                                                                                                                                                              github.com/python/cpython/pull

                                                                                                                                                                                                                                                                                                                                                                                                                              peps.python.org/pep-0773/

                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Ned Batchelder » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                @nedbat@hachyderm.io

                                                                                                                                                                                                                                                                                                                                                                                                                                Because someone in the Discord was asking about structuring tests alongside their project code, I added a bit of test structure to my pkgsample explainer: github.com/nedbat/pkgsample

                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                  The next PyPy will be 8.0.0 and should add support for Python 3.12 and be the last to support 3.11, and require glibc 2.28 (AlmaLinux8, Amazon Linux 2023, Debian 10, Ubuntu 20.04).

                                                                                                                                                                                                                                                                                                                                                                                                                                  pypy.org/posts/2026/07/moving-

                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                    Python Tip #206 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                    Know your combination and permutation tools in Python.

                                                                                                                                                                                                                                                                                                                                                                                                                                    Python ships with tools for combinations, permutations, and random selections.

                                                                                                                                                                                                                                                                                                                                                                                                                                    The itertools module includes various combinatorics-oriented utilities:

                                                                                                                                                                                                                                                                                                                                                                                                                                    from itertools import combinations, combinations_with_replacement, permutations, product

                                                                                                                                                                                                                                                                                                                                                                                                                                    This joins tuples of characters into a comma-separated string:

                                                                                                                                                                                                                                                                                                                                                                                                                                    def join(groups):
                                                                                                                                                                                                                                                                                                                                                                                                                                    return ", ".join("".join(g) for g in groups)

                                                                                                                                                                                                                                                                                                                                                                                                                                    🧵 (1/5)

                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                      @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                      ✍️ New post on using unittest.mock to spy on function calls. 🕵️‍♂️

                                                                                                                                                                                                                                                                                                                                                                                                                                      I recently learned how to use the wraps argument to track all calls to a target function for later assertions. Very useful for testing things like “is caching working?” without having to mock the function completely.

                                                                                                                                                                                                                                                                                                                                                                                                                                      adamj.eu/tech/2026/07/25/pytho

                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                        “So if you find this feature jarring enough that you'd like to never use it in your code, you can probably configure your linter to disallow it entirely.”

                                                                                                                                                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/implicit-string-concat

                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                          @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                          ✍️ Django’s release code words, up to the pending Django 6.1 “mélange”.

                                                                                                                                                                                                                                                                                                                                                                                                                                          adamj.eu/tech/2026/07/24/djang

                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Django News » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                            @djangonews@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                            @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                            🎤 Speaker Spotlight

                                                                                                                                                                                                                                                                                                                                                                                                                                            Want to make your first open source contribution?

                                                                                                                                                                                                                                                                                                                                                                                                                                            At DjangoCon US 2026, Andrew Selzer presents “Enter the Ecosystem: Contributing to Django Open Source Projects.”

                                                                                                                                                                                                                                                                                                                                                                                                                                            Learn how to find projects, choose your first issue, and start contributing with confidence.

                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                              “Python's print function is usually one of the first built-in functions that new Pythonistas learn about, but many Python programmers don't realize how versatile the print function is.”

                                                                                                                                                                                                                                                                                                                                                                                                                                              Read more 👉 pym.dev/print-features/

                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #205 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                Use statistics.multimode to get the most common items.

                                                                                                                                                                                                                                                                                                                                                                                                                                                To get the most common items in an iterable, you might be tempted to use collections.Counter. Consider using statistics.multimode instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                Compare this:

                                                                                                                                                                                                                                                                                                                                                                                                                                                counts = collections.Counter(items)
                                                                                                                                                                                                                                                                                                                                                                                                                                                [(_, top_count)] = counts.most_common(1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                commonest = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                item
                                                                                                                                                                                                                                                                                                                                                                                                                                                for item, count in counts.items()
                                                                                                                                                                                                                                                                                                                                                                                                                                                if count == top_count
                                                                                                                                                                                                                                                                                                                                                                                                                                                ]

                                                                                                                                                                                                                                                                                                                                                                                                                                                To this:

                                                                                                                                                                                                                                                                                                                                                                                                                                                commonest = statistics.multimode(items)

                                                                                                                                                                                                                                                                                                                                                                                                                                                Simpler, right?

                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                  🐍🚀 Out now: em-keyboard 5.4.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                  An emoji search CLI.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Adds support for Python 3.15 and Unicode 17.0:

                                                                                                                                                                                                                                                                                                                                                                                                                                                  ❯ em "distorted face" "fight cloud" "hairy creature" "ballet dancer" "orca" "landslide" "trombone" "treasure chest"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Copied! 🫪 🫯 🫈 🧑‍🩰 🫍 🛘 🪊 🪎

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Your device might not support them yet 🫠

                                                                                                                                                                                                                                                                                                                                                                                                                                                  blog.emojipedia.org/whats-new-

                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                    🐍🚀 Out now: flake8-implicit-str-concat 0.7.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                    A Flake8 plugin to encourage string literal concatenation. It can help tidy up after Black/Ruff.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    This release adds a new ISC004 rule: "unparenthesized implicit string concatenation in collection". See examples in the README.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Also support Python 3.15 and use PEP 639 licence expression and remove deprecated Trove classifier.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    github.com/flake8-implicit-str

                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                      The Python Morsels pastebin & REPL pages recently got some BIG updates.

                                                                                                                                                                                                                                                                                                                                                                                                                                                      pastebin: pym.dev/paste
                                                                                                                                                                                                                                                                                                                                                                                                                                                      REPL: pym.dev/repl

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Some of the many new things you can do with the pastebin and REPL that you couldn't before:

                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Run a paste before even saving it
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Add additional files to a paste
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Pass command-line arguments
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Run pastes in interactive mode
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Edit a paste after you've created it
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Drop into PDB to debug tracebacks
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Open a paste within the Python REPL

                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                        “How can you check which operating system your Python code is running on?”

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/operating-system-check

                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Python Tip #204 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Generate unique identifiers with the uuid module

                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> import uuid
                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> uid = uuid.uuid4()
                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> uid
                                                                                                                                                                                                                                                                                                                                                                                                                                                          UUID('922a6cea-c3e9-473d-bf88-efb10793c931')
                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> str(uid)
                                                                                                                                                                                                                                                                                                                                                                                                                                                          '922a6cea-c3e9-473d-bf88-efb10793c931'

                                                                                                                                                                                                                                                                                                                                                                                                                                                          UUID stands for universally unique identifiers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          The uuid module has functions for UUID version 1, 3, 4, 5, 6, 7, and 8 from RFC 4122/9562.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Versions 7 and 8 were added in Python 3.14.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                            @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                            🎤 Speaker Spotlight

                                                                                                                                                                                                                                                                                                                                                                                                                                                            At DjangoCon US 2026, Sarah Abderemane presents “50 Shades of Green – One Contribution to the Django World.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Discover the story behind Django's dark theme and what one open source contribution can teach us about making an impact.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                              @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                              You can be a part of kickstarting the brand new Python Packaging Council ✨🐍📦 Nominate yourself or someone else for the council for the inaugural election! Nominations open Tuesday, July 28th, 2:00 pm UTC and close Tuesday, August 11th, 2:00 pm UTC.
                                                                                                                                                                                                                                                                                                                                                                                                                                                              pyfound.blogspot.com/2026/07/g

                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Mindiell » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                @Mindiell@mamot.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                @ffeth sinon, il y a -fr sur IRC <3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Feth 🎉 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @ffeth@hostux.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Hmm, I got a question on , specifically .

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  I just coded a very short module with dynamically generated functions that I export, and mypy complains when I use these functions, because they're not in the module?! What am I doing wrong?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  code:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import sys
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  from functools import partial
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  __cur_mod = sys.modules[__name__]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  _COLORS: dict[str, str] = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  "grey":'\x1b[38;21m',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [...]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  for color in _COLORS:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  setattr(__cur_mod, color, partial(color_generic, color))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  __all__ = list(_COLORS)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    You can be a part of guiding the future direction of the PSF 🩵🐍💛 Nominate yourself or someone else for the PSF Board for the 2026 election! Nominations open Tuesday, July 28th, 2:00 pm UTC and close Tuesday, August 11th, 2:00 pm UTC.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    pyfound.blogspot.com/2026/07/g

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Visiting the U.S. for your first DjangoCon US?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Our new guide covers visas, payments, tipping, transportation from O'Hare, mobile data, and more to help you prepare for your trip.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      📖 Read more: 2026.djangocon.us/news/guide-t

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ✍️ Introducing django-crawl, a tool for crawling your local Django site, useful for quickly finding what’s broken or performing site-wide checks.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        adamj.eu/tech/2026/07/22/intro

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Fred de CLX boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Agenda du Libre » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @agenda_du_libre@pouet.chapril.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Lyon: C’est l’été !, Le jeudi 30 juillet 2026 de 18h00 à 21h00. agendadulibre.org/events/35507

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Gabriel-le » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @Gabrielhle@pouet.chapril.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Bonjour,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Comment me présenter rapidement ?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            un côté :

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            j'ai exercé longtemps dans la :

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            je suis en , en

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Politiquement à , dans le milieu de défense des droits +,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            loisirs :

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              “Some blank lines improve readability, but not all blank lines do.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Read more 👉 pym.dev/embrace-whitespace/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #203 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                When you need precise decimal numbers, use decimal.Decimal

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Floating point numbers have precision gotchas.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                For example, 0.1 + 0.02 isn't 0.12:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> one_two = 0.1 + 0.02
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> one_two == 0.12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                False
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> one_two
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0.12000000000000001

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Using Decimal fixes this:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> from decimal import Decimal
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> one_two = Decimal("0.1") + Decimal("0.02")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> one_two == Decimal("0.12")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                True
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> one_two
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Decimal('0.12')

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Note that we pass strings to Decimal.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Welcome @kushal back to the Python Security Response Team!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  devguide.python.org/security/p

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Following PEP 811, we have a much clearer process for PSRT membership.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  peps.python.org/pep-0811/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Thanks to Kushal and the rest of the team for helping keep Python secure.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  hugovk.dev/blog/2026/security-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Le Filament » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @le_filament@pouet.chapril.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Bonjour à toutes et tous,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    La Scop Le Filament cherche une développeuse ou un développeur Open Source, principalement pour du Python sur des modules Odoo.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    L'offre d'emploi est ici : le-filament.com/offres-emploi/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    CDI forfait 200 jours, basé à Toulouse (télétravail ponctuel possible).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]ploum » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @ploum@mamot.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      3.2 has been released.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The biggest news is that the network part is now handled by (except for ). HTML tables are also supported !

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      git.sr.ht/~lioploum/offpunk/re

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]andros » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @andros@activity.andros.dev

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        My blog has no comment form. Any reader can comment, reply and get notified; the trick is using email as the user interface.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        https://en.andros.dev/blog/ad250446/my-comment-box-is-your-email-client/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        #IndieWeb #Email #SelfHosted #OpenWeb #Python #Flask

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          “So because we're using __slots__, we can't expand the number of attributes that are on each instance of this class.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Read more 👉 pym.dev/__slots__/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🚨 The Django Con US 2026 schedule is now live!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Start planning your week in Chicago and explore everything we have in store—from talks and tutorials to keynotes and community events.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            📅 2026.djangocon.us/news/announc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ClaudioM boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Jon Moller » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @guofu@mastodon.sdf.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @gemlog @bstuf @northernlights @claudiom @darkstar @stug @jirka @RJF @pizzapal @pizza_pal @stebby @normandc @kelbot Last but not least, I wanted to share my revamped version of an existing for syncing with PCs over . My version also offers the option to delete fit files from the device and timestamps for benchmarking, amongst other features. What a great learning experience! github.com/molleraj/enhanced_x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #202 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                When prompting the user to enter a password, use getpass

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The getpass.getpass function prompts the user to enter a password and what the user types is completely hidden:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> from getpass import getpass
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> password = getpass()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Password:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Want to support the PSF and stock up on books at the same time? The 'Ultimate Python Development' Humble Bundle is available now 🐍 📚 You can customize your donation split: click "Adjust Donation" → "Custom Amount" to boost the % going to the PSF!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  humblebundle.com/books/ultimat

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Benjamin Geer » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @benjamingeer@piaille.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Candidature rejetée, après deux entretiens, parce que l'entreprise «s'oriente vers une adoption forte de l'IA dans ses pratiques de développement, une direction qui ne semble pas alignée avec vos attentes à ce stade».

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Est-ce qu'il y a encore des éditeurs de logiciels en France qui sont prêts à embaucher un développeur qui préfère écrire lui-même son code ?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      You probably won't use t-strings and Template objects in your own code, but you might pass them to code written by others.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Read more 👉 trey.io/n4mlgb

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        What does a Django Fellow do?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Natalia Bidart shares how Django Fellows help maintain the framework, support contributors, and keep the project moving forward.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🎥 youtu.be/t9Ek6Dvpozo

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          James C boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Jeff Triplett » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @webology@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          RE: mastodon.social/@farhanaliraza

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          If you missed it over the weekend, @farhanaliraza released Taipan, which bundles a Python app (file, project, files, etc) into a one-file binary that just works.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I bundled up a few PyGame projects to try it out, and to my amazement, it just worked!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #201 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Suggest typo fixes with difflib.get_close_matches

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> import difflib
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> options = ['quack', 'swim', 'walk']
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> difflib.get_close_matches('swam', options)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ['swim']

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            If you want to control how close the match must be to be suggested, you can change the cutoff argument from its default (0.6):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> difflib.get_close_matches('swam', options, cutoff=0.5)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ['swim', 'walk']

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            argparse's new suggest_on_error relies on this: docs.python.org/3/library/argp

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              mmu_man boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Les Scop & Scic AURA :labscop: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @LesScopAura@mastodon.scop.coop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              💻 Akretion : Scop spécialisée dans l’intégration et le développement autour d’, l’ .

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Créée en 2008, l'équipe de développeur·euses et consultant·es spécialisé·es accompagne les entreprises dans leurs projets de gestion : analyse des besoins, intégration, développement sur mesure, migration, hébergement, e-commerce, comptabilité, formation…

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              En tant que coopérative, le partage des connaissances et la gestion horizontale sont mots d'ordres.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ODOO : compatibilité, production, CRM, gestion commerciale, achat, point de vente.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Alt...ODOO : compatibilité, production, CRM, gestion commerciale, achat, point de vente.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Paolo Melchiorre » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @paulox@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              I’ve published my @europython 2026 recap blog post 🇪🇺

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              It brings together the Mastodon posts and photos I shared live during the conference, creating a timeline of talks, community moments, people, ...👇
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              paulox.net/2026/07/20/my-europ

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Credits 👥
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @BajoranEngineer @Marlene @Yhg1s @ambv @anorthall @antocuni @baconandcoconut @bmispelon @dongheena @ester @gi0baro @hjwp @hugovk @hynek @kirschner @marco @miketheman @pauleveritt @sabderemane @saptaks @savannah @sethmlarson @vlad @wsvincent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                “Any object that supports concatenation probably also supports self-concatenation.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/self-concatenation/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Farhan Ali Raza » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @farhanaliraza@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Claude Opus 4.5 introduced me to `uvloop` few months ago faster sibling of default event loop of python. But Fable has introduced me to custom implmentation of eventloop myself ontop of tokio rust.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  And performance gain is real. Next version of django bolt is FAST.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Python Tip #200 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Beta-test the latest Python version with uv

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    You can use uv to try out alpha, beta, and rc (release candidate) Python versions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #199 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Use uvx to try out tools without installing them 🧵

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      For example, "uvx fguess" installs & runs my fguess package in an isolated temporary environment.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This also doesn't JUST work with scripts. You can use uvx to try out Python packages in a REPL!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      You can also use "uvx --with better-dedent python" to launch a REPL with my "better-dedent" package installed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      It'll even install Python 3.14 if needed since "better-dedent" requires it!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        “Standard error is often used for printing messages related to errors, but it's also used for diagnostic output or for pretty much any output that shouldn't be mixed together with the main program output.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/standard-error/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          How do new Django contributors get started?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Lilian Tran shares her journey through Djangonaut Space and explains how mentorship, code reviews, and community help new contributors build confidence in open source.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🎥youtu.be/EgOvwjse-ck

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🐍🚀 Out now: the final 3.15 beta, live from the sprints!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            All the same goodies as beta 3, plus the official macOS installer now also installs the free-threaded `python3.15t` binary.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            And thanks to 3.16 RM @savannah for helping out!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            People discussions and working on laptops in the EuroPython sprint room.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...People discussions and working on laptops in the EuroPython sprint room.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Just released! 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🪑 PrettyTable 3.17.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              github.com/prettytable/prettyt

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Add support for Python 3.15, drop 3.9, test 3.13t-3.15t
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Set dicts with column-specific config for all column-specific attrs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Update type hints
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Replace pre-commit with prek
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              & more!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🐍🚀 Out now: Python 3.15 alpha 7!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This is the first one with lazy imports (PEP 810) and frozendict (PEP 814)! Try it out and give us feedback.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ☃️ Just one alpha left until the feature freeze! Core team: get your PEPs in!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                PEP810

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  It's been a fun and packed week, but it's not over. My main task for today's sprint is to release the final 3.15 beta with @savannah!🚀

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Collage of photos of people and events of EuroPython: summits, talks, keynote, dinners...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Alt...Collage of photos of people and events of EuroPython: summits, talks, keynote, dinners...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Python Tip #198 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Lock the dependencies for your Python scripts

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    After you start using inline script metadata to have uv automatically manage your script's dependencies (tip 197), how can you ensure the dependencies of your dependencies don't break your code?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    You could pin your dependencies... but you'd also want to pin the dependencies of your dependencies and such.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      “The fromkeys method doesn't attempt to copy the object you give it.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Read more 👉 pym.dev/default-dictionary-val

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Matthias Kirschner » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @kirschner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Big thank you to all the many people who were involved in organising ! Amazing how many people volunteered to make this event happen and enable the sharing of knowledge around ❤️

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        stage with many people in yellow organiser shirts

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Alt...stage with many people in yellow organiser shirts

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Cyril Brulebois » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @CyrilBrulebois@mamot.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Oh wow, that's a pretty bad regression: bugs.debian.org/1141977

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Fixed packages should end up in trixie-proposed-updates (for inclusion in the next point release) but should also be published via trixie-updates much earlier: bugs.debian.org/1142261

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Taggart :ifin: boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]David Lord :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @davidism@mas.to

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Pallets now documents our LLM and AI tool use policy, explaining why we value human contributions rather than trying to instruct the tools. I don't think this will make a difference to the amount of generated junk we get, but I hope people who care find value in it. palletsprojects.com/contributi

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              xcanehan boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #197 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use uv for one-off Python scripts

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Have a Python script that requires dependencies?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use inline script metadata, change your file mode to executable, and put this shebang line at the top of the file:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              #!/usr/bin/env -S uv run --script

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              To add a dependency to your script, you can either manually edit the "# /// script" block by hand or use "uv add":

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              $ uv add --script my_script.py requests

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Yann Büchau :nixos: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @nobodyinperson@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                It's 2026 and :python: 's standard library *still* does not have a flatten function? 🤨

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (Yes, more-itertools, that's not the point)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lux 🦊ΘΔ boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Soblow Xaselgio :dragn_heart: [she/her, they/them] » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @Soblow@eldritch.cafe

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  New blogpost! :dragn_heart:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  xaselgio.net/posts/029.shazam_

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  I have used Shazam, the song identification app, for several years.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  While it still serves its purpose marvelously, I do not feel okay with the idea of keeping the history of songs I found this way on this service, with no way to export it. :dragn_blanket:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  In this blogpost, I dig into how to export your Shazam library as a readable CSV.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  I also describe my little scripting adventure to make a Python script which would use that CSV to download music from Youtube (using yt-dlp) and then make sure that it is the right song, matching what was inside the CSV export. :dragn_cookie:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Sources are available on our Git forge as well.~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Hope you'll enjoy the read!~ :dragn_loaf:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    “Once the condition becomes False (or a falsey value) the loop stops.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Read more 👉 pym.dev/while-loops/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #196 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Manage your virtual environments with uv

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      You can get the speed of uv while still using venvs and pip the way you always have.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Instead of "python3.14 -m venv .venv", use "uv venv -p 3.14"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Instead of "pip install" use "uv pip install"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      But... why?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Speed!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Using "uv pip install" is often MUCH faster than using "pip install".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Pete Prodoehl 🍕 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @rasterweb@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I wrote this function to do some math, and I got it working, tested it, but now I have to explain it to someone and...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Well, that's the difficult part!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I knew the input and desired output and built up how to get what I needed but making it explainable is a bit of a challenge...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Which is good though, as it's forcing me to double-check my work.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (And I am *not* good at math!)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          "We're just normal men" -- @ambv, with Pablo interviewing Guido at .

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Seated on stage: Pablo in a baby shark hat, Guido in a octopus hat, and Łukasz in a. VLC traffic cone hat.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Alt...Seated on stage: Pablo in a baby shark hat, Guido in a octopus hat, and Łukasz in a. VLC traffic cone hat.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Jesus Michał von Gentoo 🏔 (he) » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @mgorny@social.treehouse.systems

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The state of ecosystem right now: almost everything is slop. Some projects are complete vibe-coded slop (autobahn, chardet, cryptography). Some projects are disguised slop ("Coding agents shouldn't co-author themselves.")

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            There is only a handful of human projects left (Flask being one bright example). And they're being killed. They're being killed by the neverending slew of slop pull requests. They're being killed by all their dependencies becoming slop. They're being killed because this whole ecosystem has became such a complete cesspit that you have zero motivation to do anything.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            EDIT: and honestly, this is only going to get worse. When you kill the incentive to work on projects, you only get more slop. Maintainers give in, and more projects become slop. Or they give up, and projects get forked unto slop.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              We want your vote! Voting eligible PSF Members (Supporting, Contributing, and Fellow) need to affirm their membership to vote in this year’s PSF Board and/or Python Packaging Council elections to ensure that each election reaches quorum 🗳️

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              pyfound.blogspot.com/2026/07/a

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]John Shaft » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @shaft@piaille.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Ayé, 3.14 est dans Forky (aka Testing)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Et oui, il y a la blague (faite par python3-venv je dirais)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                $ /opt/venv/john/bin/πthon -V
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python 3.14.6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Jesus Michał von Gentoo 🏔 (he) » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @mgorny@social.treehouse.systems

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The state of ecosystem right now: almost everything is slop. Some projects are complete vibe-coded slop (autobahn, chardet, cryptography). Some projects are disguised slop ("Coding agents shouldn't co-author themselves.")

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  There is only a handful of human projects left (Flask being one bright example). And they're being killed. They're being killed by the neverending slew of slop pull requests. They're being killed by all their dependencies becoming slop. They're being killed because this whole ecosystem has became such a complete cesspit that you have zero motivation to do anything.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  EDIT: and honestly, this is only going to get worse. When you kill the incentive to work on projects, you only get more slop. Maintainers give in, and more projects become slop. Or they give up, and projects get forked unto slop.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Python sees a line feed (\n) as the canonical way to represent a newline.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Read more 👉 trey.io/ca0qyn

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Marcos Dione boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Paul :python: :django: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @pbx@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      We're at PowerDash! I know there are a lot of people in my network with the perfect mix of skills for this role — full stack with a strong / bent. Throw your hat in, or pass the word. It's a great little company in an important space.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Office is in Cambridge (Harvard Square). Role is on-site or hybrid.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Senior Full Stack Software Engineer: apply.workable.com/powerdash/j

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        How is AI changing the way developers learn Django?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        William Vincent shares his thoughts on AI, technical education, and making Django more accessible in this DjangoCon US Insights & Perspectives interview.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Watch now: youtu.be/zOsM49ojzdg

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ✍️ New post covering a debugging hack using gc.get_objects() to find all instances of a class in Python.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          adamj.eu/tech/2026/07/14/pytho

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #195 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Globally install Python-powered command-line tools with "uv tool install"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            To install my Python-powered countdown-cli globally, I can do this:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            $ uv tool install countdown-cli
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Resolved 2 packages in 169ms
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Installed 2 packages in 5ms
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + click==8.3.2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + countdown-cli==2.2.1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Installed 1 executable: countdown

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Then I can run "countdown" ANYWHERE on my machine to start a countdown timer.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Finally!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ⚡ Lightning talks! ⚡

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Mark Shannon - One-time ABI breakage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Daniele Parmeggiani – Safer and Generic Interruptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @kushal - EktuPy, Python for Scratch generation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @gpshead & @ambv - agents.md and skills for CPython repo

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Ken Jin - pls read PEP 836

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              And we're done! That was fun! The next Language Summit will be at @pycon US next year at Long Beach, then back at @europython for 2028!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Mark

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Alt...Mark

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Daniele

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Alt...Daniele

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Kushal

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Alt...Kushal

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Łukasz and Greg

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Alt...Łukasz and Greg

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Last regular talk/discussion before lightning talks!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                PEP 827 - Type manipulation and annotationlib — Michael J. Sullivan

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ep2026.europython.eu/language-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Sully presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Sully presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Łukasz asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Łukasz asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Daniele asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Daniele asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Yury asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Yury asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  I wrote about how, like many other open-source projects, CPython is experiencing a huge increase in security reports. Charts inside!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  hugovk.dev/blog/2026/security-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    And now:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Thinking about the post era of free-threading Python — @dongheena, Tobias Wrigstad, Fridtjof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ep2026.europython.eu/language-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Tobias, Donghee and Fridtjof presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Tobias, Donghee and Fridtjof presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Fridtjof presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Fridtjof presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Tobias answering a question, Donghee and Fridtjof on stage.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Tobias answering a question, Donghee and Fridtjof on stage.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Thomas asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Thomas asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The July edition of the PSF Board Office Hour is about to begin 🐍 🗒️ 1 PM UTC. We welcome you to join us to share how we can help your community, express your perspectives, and we'd love to answer your questions about the upcoming PSF Board Election!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      pyfound.blogspot.com/2025/10/a

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Next up!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Developer in Residence update & future — @encukou

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ep2026.europython.eu/language-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Petr presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Alt...Petr presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Slide showing dev-in-res responsibilities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Alt...Slide showing dev-in-res responsibilities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Toshio asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Alt...Toshio asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Savannah asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Alt...Savannah asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Paolo Melchiorre » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @paulox@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          On my way to Krakow to attend @europython 2026 🇪🇺

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          PSR to KRK ✈️

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          See you all there 👋

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          CC @europython

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          A selfie of me with an airplane in the background

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Alt...A selfie of me with an airplane in the background

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Then:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Spicycrab, the Rust transpiler — @kushal

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ep2026.europython.eu/language-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Kushal presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Kushal presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Ken Jin asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Ken Jin asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Greg asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Greg asking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Back from lunch!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              A Roadmap for Rust for CPython — @davidhewitt

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ep2026.europython.eu/language-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              David presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Alt...David presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              A proposed roadmap for Rust for CPython.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Alt...A proposed roadmap for Rust for CPython.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Pablo asking a question.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Alt...Pablo asking a question.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A packed morning concludes with:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Memory snapshots and the CPython runtime — Hood Chatham

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ep2026.europython.eu/language-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Hood presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Hood presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Mark Shannon asking a question.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Mark Shannon asking a question.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  And then:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Improving the Python buffer protocol — Nathan Goldbaum

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ep2026.europython.eu/language-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Nathan presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Alt...Nathan presenting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Hood Chatham asking a question.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Alt...Hood Chatham asking a question.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    And now:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    GC: Generational? Incremental? Both. — Mark Shannon

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ep2026.europython.eu/language-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Mark presenting

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Mark presenting

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Attendees sitting in a big U shape, about 15 per section.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Attendees sitting in a big U shape, about 15 per section.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Larry Hastings asking a question.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Larry Hastings asking a question.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Pablo Galindo Salgado asking a question.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Pablo Galindo Salgado asking a question.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      First up: One namespace to namespacing them all — Pablo Galindo Salgado

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ep2026.europython.eu/language-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Pablo presenting

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Alt...Pablo presenting

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Hello from Kraków and the sun is shining for the at !

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The Wawel caste reflecting across the Vistula river.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Alt...The Wawel caste reflecting across the Vistula river.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🎤 Speaker Spotlight

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Natalia presents:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ✨ Wishlist granted: HTMX without betraying your Django views

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          See how a real Django marketplace feature gained HTMX interactivity with small changes without rewrites or sacrificing maintainability.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Staying at the conference hotel?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Reserve your room by August 3 to secure the DjangoCon US conference rate.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Book now: 2026.djangocon.us

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #194 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Install Python with uv

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              I recommend using:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              $ uv python install --default 3.14

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Specifying "--default" will install symbolic links for python, python3, and python3.N (where N is the minor version number).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Using uv to install Python makes it easy to upgrade subminor versions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Just run:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              $ uv python upgrade

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              If you have Python 3.14.4 installed after 3.14.5 is out, that "python upgrade" command will install it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #193 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                To compare iterables while ignoring order and duplication, use a set equality check.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Like this:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> set(iterable1) == set(iterable2)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                True

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Like all things set-related, this requires hashable items.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  “Unless you really need an index for your substring match, a containment check will do just fine.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Read more 👉 pym.dev/avoid-indexes-in-pytho

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    “Sorted will call that key function on each item in the given iterable, and it'll sort the items by the result of whatever that key function returns for each item.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Read more 👉 pym.dev/sorting-in-python/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #192 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      To compare iterables while counting duplicates but ignoring order, use Counter.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      A Counter tallies how many times each item appears. Counters are equal when every item appears the same number of times, regardless of order:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> from collections import Counter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> Counter([1, 2, 2, 3]) == Counter([3, 2, 1, 2])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      True
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> Counter([1, 2, 3]) == Counter([1, 2, 2, 3])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      False

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The second check is False because one iterable has an extra 2.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Python Tip #191 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Compare iterables item-by-item with all() & zip().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The == operator won't compare a list and a tuple by their contents:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        >>> a = [1, 2, 3]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        >>> b = (1, 2, 3)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        >>> a == b
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        False

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        And two generators can't be compared by their contents at all.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        You can compare any iterables item-by-item, regardless of their type like this:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        >>> all(x == y for x, y in zip(a, b, strict=True))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        True

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Django News » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @djangonews@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          First time attending DjangoCon US?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          We've put together a packing guide with everything you should bring from laptops and water bottles to comfortable clothes and a few Chicago-specific tips.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          📖 Read more: 2026.djangocon.us/news/first-t

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            “The simplest use of a set is probably also its most common use: checking for duplicates.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read more 👉 pym.dev/practical-uses-of-sets/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]defnull » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @defnull@chaos.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              New update for my :

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              defnull.de/2026/python-multipa

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The benchmark tests and compares the most commonly used Python parsers for multipart/form-data (HTML5 forms) in different scenarios, including a parser and a parser. The results may surprise you :awesome:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Disclaimer: I'm the author of the 'multipart' library.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hacker News » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @h4ckernews@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #190 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                To remove duplicates while maintaining the original iterable order, use dict.fromkeys.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Converting to a set removes duplicates, but it loses the original order:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> colors = ["red", "green", "blue", "green", "red"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> set(colors)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                {'blue', 'green', 'red'}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  🎤 Speaker Spotlight

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Calvin Hendryx-Parker & Frank Wiles present:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ⚡ Batteries vs. Speed: The Django/FastAPI Debate

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  A practical look at where Django shines, where FastAPI excels, and how to choose the right tool for the job.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    DjangoCon US Insights & Perspectives

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In this episode, Kenya Phelps reflects on her journey into software development, the importance of mentorship, and how building an inclusive community strengthens the Django ecosystem.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Watch the conversation and hear her perspective on creating welcoming spaces in open source.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    youtube.com/watch?v=Z-_8m7rt6Y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Romain Tartière » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @smortex@mamot.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Dear ,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I am looking for a way to generate a simple in without extra run-time dependencies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I am happy to use whatever tooling is needed to generate the parser, but the generated Python code must be standalone (just like lex/yacc generate standalone C code).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I found a lot of parser generators for Python but they all introduce run-time dependencies that I would really like to avoid.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Do you know a tool that fits this use-case?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Retoots appreciated!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        “It's easy to overdo it when defaulting dictionary values.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/default-dictionary-val

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Kushal Das :python: :tor: 🇸🇪 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @kushal@toots.dgplug.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I am wondering how many of friends here worked with ?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Nicoco boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]mathieui » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @mathieui@piaille.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Happy to announce the release of slixmpp, the python XMPP library in its 1.17.0 version.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            It has a few improvements alongside an important bugfix for components, as well as many other changes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read the full changelog at blog.mathieui.net/slixmpp-1-17

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              “But what if you need to perform an operation repeatedly and you don't have an iterable to loop over?”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Read more 👉 pym.dev/while-loops/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #189 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Check for duplicates by converting to a set.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                To check whether your collection contains duplicate items, make a set out of it and compare the original length to the set length:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> len(set(colors)) == len(colors)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                False

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Sets can't hold duplicates, so if a set conversion shrinks the length, there were duplicates.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A caveat: this assumes all item are hashable (like strings, numbers, & tuples of hashable items).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                More: pym.dev/practical-uses-of-sets/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]codingjoe :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @codingjoe@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]codingjoe :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @codingjoe@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  BIG NEWS! 😮

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  got another task backend. 🎉

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Threadmill has a durable message queue based on Redis as well as a monitoring interface based on textual.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  github.com/codingjoe/threadmill

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    What's New in Python 3.15:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Upgraded JIT compiler

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Results from pyperformance suite: 8-9% geometric mean performance improvement over the standard CPython interpreter built with all optimisations enabled on x86-64 Linux.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    On AArch64 macOS, 12-13% speedup over the tail calling interpreter with all optimisations enabled.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The speedups versus no JIT builds range from roughly 15% slowdown to over 100% speedup on x86-64 Linux and AArch64 macOS.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RE: fosstodon.org/@pillow/11684469

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      New @pillow release!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🛞 Wheels for Python 3.15 beta
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧾 An SBOM in all the wheels
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🚅 Performance improvements thanks to @akx
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🔒 Security fixes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ❌ No longer a wheel for free-threaded Python 3.13, it was experimental and 3.14+ has official support with better performance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🎤 Speaker Spotlight

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Elizabeth Christensen joins DjangoCon US 2026 with:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        "What's New in Postgres 18 & 19"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Learn which new PostgreSQL features are ready for your Django apps and which ones can wait.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          To remember that you need strptime for parsing instead of strftime, remember that it's "string parse time" and "string format time".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Read more 👉 trey.io/l4b84k

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            oldsysops boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Krios101 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @Krios101@mastodonapp.uk

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Hi All, I am looking for full time, mid-senior level UK job roles. I am based in the UK and I've got 9 years experience working with it primarily in scientific disciplines (Earth Observation ) and a small amount in doing backend work. I've designed a wide variety of scientific Python scripts and programs and I've had the privellige of working with on several projects including presenting my work internationally and having my investigations published on their websites.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            I'm looking for more coding work in scientific disciplines or more work if possible. I am also skilled in QA like work, deep analysis, Git and self hosting.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            I'm primarily open to remote work within the UK and remote European work dependent on what is available. I am open to hybrid work based in Buckinghamshire but it would preferably have to be 1 day a week in an office, potentially 2. Reply or DM me for more details. Boosts appreciated!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #188 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              To find the first item that matches a condition, combine next with a generator expression.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Like this:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> numbers = [4, -1, 8, -3, 0, 6]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> next(n for n in numbers if n < 0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The generator expression finds matching items lazily and next stops as soon as a match is found.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #187 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Need to count how many items match a condition? Sum up booleans. 🧵

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Booleans are integers in Python:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> issubclass(bool, int)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                True

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                True acts just like 1 and False acts just like 0.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I wouldn't rely on that fact often... BUT there's one specific place where this fact is very handy...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  🎤 Speaker Spotlight

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Paolo Melchiorre joins DjangoCon US 2026 with:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  "The Django UUID Story"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Discover how UUID support in Django has evolved from DjangoCon Europe sprints to UUIDv7 and broader database support.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Kushal Das :python: :tor: 🇸🇪 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @kushal@toots.dgplug.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    And if you need then use pybergshamra.readthedocs.io/en for all in pure level in .

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Kushal Das :python: :tor: 🇸🇪 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @kushal@toots.dgplug.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      pyuppsala.readthedocs.io/en/la I released 0.9.0 of my based library. A lot of hardening and very good improvement.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        What's New in Python 3.15:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        warnings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        * Improve filtering by module in warnings.warn_explicit() if no module argument is passed. It now tests the module regular expression in the warnings filter not only against the filename with .py stripped, but also against module names constructed starting from different parent directories of the filename (with /__init__.py, .py and, on Windows, .pyw stripped). (Contributed by Serhiy Storchaka.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🎤 Speaker Spotlight

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Paolo Melchiorre joins DjangoCon US 2026 with:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          "The Django UUID Story"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Discover how UUID support in Django has evolved from DjangoCon Europe sprints to UUIDv7 and broader database support.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Workshop sponsorships are now open for DjangoCon US 2026!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Have a hands-on tutorial, onboarding workshop, or technical training session your team already uses? Bring it to DjangoCon US and teach an audience that's ready to dive deep.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🗓️ Applications close July 28

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2026.djangocon.us/sponsors/inf

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              victor héry boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Miss Mint 🦊 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @Mint@piaille.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Appel à bonnes âmes 😁

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Mon compagnon, cet homme incroyable, m'a fait un script python pour me permettre de tamponner des pièces de procédure en 3 secondes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              En ayant parlé à d'autres, il s'avère qu'iels seraient intéressé.e.s mais ne sont pas sous linux (cheh)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              J'ai deux questions :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              - où mettre son dépôt git pour pouvoir le partager
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              - est-ce qu'il y a des trucs pour pouvoir faire fonctionner facilement ce truc sans passer par un terminal => le rendre humain compatible 😁 et éventuellement mac et windows accessible
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Tout en réalisant le traitement sur le PC et non en ligne (secret pro 4ever)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Merci d'avance pour votre aide

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python's error messages have improved a lot in the past few versions, and this is exactly the kind of change that makes Python even more beginner-friendly.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 trey.io/flfwr9

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Erwan 🚄 boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Feth 🎉 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @ffeth@hostux.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Fiston est méga motivé pour, à la rentrée, remplir un site web avec
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - photo d'aménagement piéton/vélo ridicule
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - localisation dans l'agglo
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - textes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Si possible avec des mômes de son âge, qui feront le design.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Je vais bien sûr mettre ce site web en place.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Idéalement, j'aimerais que ça soit le moins de maintenance possible hors mises à jour de contenu.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  En gros, une galerie de photos géolocalisées et un blog. Je parle pas trop mal le et je tiens pas à tout réinventer.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  :retoot:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Farhan Ali Raza » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @farhanaliraza@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Django bolt 0.9.0 Update

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    - Welcome an new HTTP method `Query`, now your get requests can carry a body.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    - Workers now can now respawn according to memory usage limit or time limit.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    - Other bug fixes (Open API, Serializer computed field, django admin)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Thanks to all contributors of this release.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    github.com/dj-bolt/django-bolt

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    django bolt 0.9.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...django bolt 0.9.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #186 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Use the errors argument when reading files with encoding issues.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      When reading a file, invalid bytes in the chosen encoding will raise an exception:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> p = pathlib.Path("p")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> p.write_text("café", encoding="cp1252")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> p.‍read_text(encoding="utf-8")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3: unexpected end of data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      With the "errors" argument, we can suppress this exception.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        “Python's while loops are for looping based on a condition.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/while-loops/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Nicolas Delsaux » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @Riduidel@framapiaf.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Sans doute la façon la plus simple de télécharger un album, un artiste depuis Spotify. L'astuce, c'est bien sûr qu'il ne télécharge pas les chansons depuis Spotify. Le seul truc à personnaliser, c'est le format des fichiers (j'utilise ce formatage "output": "{artist}/({year}) - {album}/{track-number} - {title}.{output-ext}") spotdl.github.io/spotify-downl

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            “What if you want every key lookup you ever perform on your dictionary to have a default value?”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read more 👉 pym.dev/default-dictionary-val

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #185 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Normalize Unicode strings before comparing them.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Some Unicode characters can be written in more than one way.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python's == won't consider them equal even if they look identical.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use unicodedata.normalize() to fix this.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The letter "é" can be stored two ways:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • 1 precomposed character
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • "e" plus a combining accent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Both look the same, but they're not:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> x, y = "café", "café"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> x == y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              False
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> len(x), len(y)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (4, 5)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]bmaxv » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @bmaxv@noc.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk I think this is a wrong solution, in the sense that this is a built in conceptual downside of a central repository.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                If things like that are done, we have long left the space of simple packages, simple installs and simple quick and dirty scripts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                To me, it would make way more sense to leverage urls, redirects and long, explicit names. The projects have their own domains anyway.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                e.g. https packages.google.com/cloud/w/e

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                1/2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The reversed() function works on all sequences, but it also works on some other iterables, like dictionaries

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Read more 👉 trey.io/ur7l4g

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    step 1: do an experimental JIT
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    step 2: do a website called doesjitgobrrr.com to track performance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    step 3: write a PEP called "JIT Go Brrr"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    step 4: non-experimental JIT gone brrr?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    step 5: CPython gone brr?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    step 6: brrr?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    peps.python.org/pep-0836/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🎤 Speaker Spotlight

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Abigail Afi Gbadago will be speaking at DjangoCon US 2026!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      "Polyglot Persistence with Django: When One Database Isn't Enough"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Learn how Django apps can combine PostgreSQL and MongoDB, and explore the integration patterns and real-world tradeoffs involved.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]DjangoCon US :django: :python: » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @djangocon@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🎤 Speaker Spotlight

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Will Vincent joins DjangoCon US 2026 with:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        "Modern Django Deployments in 2026"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Learn practical lessons on deploying Django apps, from architecture and infrastructure choices to production-ready settings.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          AodeRelay boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Python Tip #184 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Always specify the encoding when opening text files.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          With no encoding specified, Python will pick a platform-dependent default encoding.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          A wrong encoding may raise an exception or may result in "mojibake" (garbled nonsense).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Opening a UTF-8 file as CP-1252 turns "✨" into "✨":

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> path = pathlib.Path("sparkles.txt")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> path.write_text("✨", encoding="utf-8")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> path.read_text(encoding="cp1252")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          '✨'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🗓️ The Language Summit schedule is now up!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ep2026.europython.eu/language-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ⚡ Lightning talks can be submitted on site on the day.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Have you written a new PEP and are ready for a PEP number? (Either you're a Python core team member or found one to sponsor your PEP.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Old way: scour through peps.python.org/ and github.com/python/peps/pulls to find which is next

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Better way:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ❯ uvx pepotron next
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Next available PEP: 837

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🆕 New: visit hugovk.dev/next-pep-number/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Marcos Dione » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @mdione@en.osm.town

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                EuroPython's sponsors have open opportunities... in , of course:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                blog.europython.eu/europython-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Summary: 8 positions, 6 on AI, 2 in marketing, 3 in Finance or Banks. 3 without location; 2 hybrid, Kraków and Paris; 2 on site, Dublin and US or UK; and 1 remote but on selected countries in Europa.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  “Most of our loops in Python are modeled from the perspective of looping over an iterable: that's what Python's for loops are for.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Read more 👉 pym.dev/while-loops/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Laurent Cheylus » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @lcheylus@bsd.network

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    uv audit: a new Command for the Python project manager ; scans your dependencies for known vulnerabilities and "adverse" project statuses (such as being deprecated). Alternative to pip-audit, and is between 4x and 10x faster on typical projects astral.sh/blog/uv-audit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Got questions about the 2026 PSF Board election? Curious about running? Join the upcoming PSF Board Office Hours session on Tuesday, July 14th, at 1 PM UTC on the PSF Discord to chat with current board members!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      pyfound.blogspot.com/2026/07/t

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Carlton Gibson » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @carlton@chaos.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        If you’re at a loose end, I’m chatting to @mkennedy on @talkpython later on this afternoon. You can get it live at 2pm UTC, or watch the replay later🎙️

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        m.youtube.com/watch?v=J1WXYE1W

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Python Tip #183 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Wrap text to a fixed width with textwrap.wrap.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Need to hard-wrap a long string to 70 (or any number of) characters?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Use wrap() or fill() from Python's textwrap module.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The wrap() function breaks text into a list of lines:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> import textwrap
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> text = "Permission is hereby granted, free of charge, to any person obtaining a copy of this software..."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> textwrap.wrap(text, width=20)[:2]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ['Permission is hereby', 'granted, free of']

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            How can you improve the readability of long Boolean expressions in Python?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read more 👉 trey.io/f98u5c

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #182 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use textwrap.dedent to unindent multi-line strings.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Without dedent:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> def help_text():
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ... return """
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ... Usage: my_tool [options]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ... -h, --help Show this message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ... """
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> print(help_text())

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Usage: my_tool [options]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -h, --help Show this message

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              With dedent:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> from textwrap import dedent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> print(dedent(help_text()))

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Usage: my_tool [options]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -h, --help Show this message

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Marud :mastodont_v2: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @marud@social.marud.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Hey la team : quelqu'un saurait m'expliquer pourquoi dès qu'il est utilisé, mon objet CSV (ici reader) se retrouve vidé ?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Je cherche à l'utiliser plusieurs fois, c'est quoi la bonne méthode pour le conserver entre deux usages ? J'ai pas envie de refaire un open, c'est un gros fichier.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                f = open("Lexique4.tsv", encoding="utf-8")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                reader = csv.DictReader(f, delimiter="\t")

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python Tip #181 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Don't use Python's "str.title()" method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  It capitalizes letters after apostrophes, turning "don't" into "Don'T".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Here's the problem:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >>> "Python is a don't-miss language".title()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  "Python Is A Don'T-Miss Language"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  str.title() defines a "word" as anything following a non-letter character.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Since ' isn't a letter, the t in "don't" gets capitalized.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  For most cases, capwords() from the string module is a better choice.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    “Self-concatenation is useful for making strings that contain the same character or the same sequence of characters a specific number of times.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Read more 👉 pym.dev/self-concatenation/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @skjaeve You're in luck when you upgrade to 3.13!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      A better interactive interpreter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * Direct support for REPL-specific commands like help, exit, and quit, without the need to call them as functions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      docs.python.org/3.13/whatsnew/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🐍🚀 Out now: Humanize 4.16!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Add Latvian language localization
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Add i18n support for naturalsize() and French translation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Performance improvements: 1.07x - 8.4x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Lazy imports for Python 3.15+
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Drop experimental Python 3.13 free-threaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Refactor: simplify scientific() and extract _SUPERSCRIPT_MAP constant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        And seven assorted bug fixes!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        github.com/python-humanize/hum

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Eric Matthes » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @ehmatthes@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Well, a week at the beach was a nice break but it didn't make me leave tech forever. :)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          gh-profiler 0.8.4 is a small release. You can pass a GitHub profile URL instead of just a bare username. Also, -h works for help.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          This is nice because if you're on a user's profile page, you can just copy the URL instead of trying to copy or type just their username. Thanks @hugovk

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          $ uvx gh-profiler https://github.com/ehmatthes --concise
GitHub user: ehmatthes
🟢 No concerns found with user's profile.
🟢 No concerns found with recent PR activity.
🟢 No concerns found with recent issue activity.

For a more detailed report, run `gh-profiler ehmatthes`.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Alt...$ uvx gh-profiler https://github.com/ehmatthes --concise GitHub user: ehmatthes 🟢 No concerns found with user's profile. 🟢 No concerns found with recent PR activity. 🟢 No concerns found with recent issue activity. For a more detailed report, run `gh-profiler ehmatthes`.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🚀 It's out!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🥧 Please install and enjoy Python 3.14!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Two snakes enjoying a pie with 3.14 on the top and π crimping.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Two snakes enjoying a pie with 3.14 on the top and π crimping.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🐍🚀 Out now: pylast 7.1.0!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              pylast is a Python interface to Last.fm and Libre.fm

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🎹 Replace HTTPX with HTTPX2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🎶 Remove legacy Python 2 code
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🪇 And five bug fixes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              github.com/pylast/pylast/relea

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Forget* about Python 3.14, all the cool kids are trying out Python 3.15.0 alpha 1 (but not on production)! 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🔬 PEP 799: A dedicated profiling package for Python profiling tools
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                💬 PEP 686: Python now uses UTF-8 as the default encoding
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🌊 PEP 782: A new PyBytesWriter C API to create a Python bytes object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ⚠️ Better error messages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * Please don't forget about 3.14...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Just released! 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  📜 Python Docs Sphinx Theme, with added Arabic, French, Romanian and Russian translations.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  github.com/python/python-docs-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Just released! 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🎨 termcolor 3.2.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    github.com/termcolor/termcolor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🟣 Expose `can_colorize` as public API
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🟢 Add support for Python 3.15 (🥉 at pyreadiness.org/3.15/)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🔴 Drop support for EOLish Python 3.9

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Out now: pepotron 1.6.0, with the new Python 3.16 schedule:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ❯ pep 3.16
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      peps.python.org/pep-0826/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ❯ pep 8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      peps.python.org/pep-0008/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ❯ pep lazy
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Score Result
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      90 PEP 810: Explicit lazy imports
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      73 PEP 690: Lazy Imports
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      68 PEP 217: Display Hook for Interactive Use
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      68 PEP 802: Display Syntax for the Empty Set
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      57 PEP 227: Statically Nested Scopes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      peps.python.org/pep-0810/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ❯ uvx pepotron 3.16
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      peps.python.org/pep-0826/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      mastodon.social/@peps@feedsin.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Python Tip #180 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Zero-pad numbers with f-strings.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Need to format a time like "9:05" instead of "9:5"?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Use "02d" in your f-string format spec.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Without zero-padding:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        >>> hour, minute = 9, 5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        >>> f"{hour}:{minute}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        '9:5'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        With zero-padding on the minutes:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        >>> f"{hour}:{minute:02d}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        '9:05'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The "02d" format spec pads the number with zeros until it's 2 digits long. 0 means "zero pad", 2 is the minimum width, and "d" means integer.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Matthew Martin » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @mistersql@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I want default extras so bad...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          - put fast things like orjson, rtoml, google-re2 and so on in extras: 99% of your users will have a bad experience out of box
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          - move them to direct dependency? now you can't upgrade or try out 3.15 and *some day* your users will not be able to carry on because the orjson or rtoml guy died or google-re2 staff were laid off and there aren't wheels anymore.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            “The get method is the classic way to look up a value for a dictionary key without raising an exception for missing keys.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read more 👉 pym.dev/default-dictionary-val

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Big news for the packaging world: The inaugural Python Packaging Council election is coming up soon! The council will be the technical decision-making body for Python packaging specs, coordinating across tools, teams, and the wider community. Learn more on the PSF blog:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              pyfound.blogspot.com/2026/06/p

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Anthony » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @anthony@indieweb.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                RE: social.breizhcamp.org/@pythonr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Mercredi soir, c'est la dernière session de de la saison. On y parlera majoritairement de donc ça peut vous intéresser même si vous ne faîtes pas de .

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - Plaidoyer pour un monde sans par Jonathan Leger.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - SQL avancé (via ORM ) par moi même.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Il reste des places et la météo sera agréable. Inscription sur meetup.com/python-rennes/event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Merci Liksi pour l'accueil !

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Python Rennes » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @pythonrennes@social.breizhcamp.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🐍📣 la prochaine session de aura finalement lieu le mercredi 1er juillet 2026 à 19h chez Liksi (🙏 pour l'accueil) 🎉

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Jonathan Leger questionnera l'utilisation d', @anthony vous parlera de avancé avec @django.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inscription gratuite mais nécessaire sur meetup.com/python-rennes/event

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  “Python will be happy with it, but other programmers will probably find it pretty confusing.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Read more 👉 pym.dev/unnecessary-parenthese

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Ash_Crow boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Python Tip #179 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Use history & paste mode in the new REPL. 🧵

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    F2 enters history: previous code is shown WITHOUT >>> prompts, so you can copy just the code.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    F3 enters paste mode: Enter won't accidentally run your code block while you're editing it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I find history mode (F2) useful for copying code out of the REPL.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In history mode, you see just the code you typed, without the prompts and output intermixed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    pym.dev/repl-features/#history

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Jean Marie Favreau » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @jm_favreau@c.im

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Mardi prochain à 18h30 au bar Fermenté.e, je présenterai le fonctionnement technique de Trognoncal, le logiciel que j'ai développé pour faire fonctionner @pommesdelune
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Si vous voulez y assistez, foncez réserver votre place ici :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      meetup.com/pyclermont/events/3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      À la suite de cette présentation, la communauté pommes de lune se retrouvera pour un moment de convivialité :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      pommesdelune.fr/event/2026/6/3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      venez discuter avec celles et ceux qui font vivre ce site, qui l'alimentent au quotidien, et vous proposent un agenda culturel toujours plus chouette !

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Cheuk Ting Ho » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @cheukting_ho@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Last chance to register and speak at - we only have a couple of talk slots left, if you would like to speak, let us know . We also welcome anyone at any level to join us. All information at ep2026.europython.eu/session/r

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ✍️ New post on using WeakKeyDictionary to store extra per-object data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Documenting a pattern I’ve used in several places to store extra data without touching the object itself.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          adamj.eu/tech/2026/06/27/pytho

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #178 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Hack your Python REPL.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The REPL in Python 3.14 includes syntax highlighting. It's pretty great!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            But did you know that you can customize the color scheme it uses?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            You can also customize other REPL features, like adding your own custom keyboard shortcuts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #177 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Learn your REPL's keyboard shortcuts. 🧵

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This is especially useful in Python 3.13+ because there are even more useful shortcuts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The most useful: Ctrl+P and Ctrl+N navigate between blocks (not lines).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              There's also:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Ctrl+L: clear screen
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Ctrl+R: search your history
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Alt+Enter: run current block
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Ctrl+K: delete from cursor to end of line
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Ctrl+Left / Ctrl+Right: jump one word at a time

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Github Coprolite [he / him] » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @pikesley@mastodon.me.uk

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                question:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                So I can do this to increment some value:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                a += 1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ```

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                And I can do this do make a value roll through `0, 1, 2, 0, 1, 2`:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                a = (a + 1) % 3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ```

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Is there some shorthand which combines these two?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python Tip #176 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Customize your REPL with PYTHONSTARTUP. 🧵

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If you set the PYTHONSTARTUP environment variable to point to a file containing Python code:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  export PYTHONSTARTUP=~/.pythonstartup.py

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python will run that file at the start of each new Python REPL.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  For example, ~/.pythonstartup.py might contain:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  from pprint import pp
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  from pathlib import Path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Now those are available in each new REPL:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >>> Path.cwd()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  PosixPath('/home/trey')

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  docs.python.org/3/tutorial/app

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    “All forms of iteration do the same thing in Python.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Read more 👉 pym.dev/all-iteration-is-the-s

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Great coverage from @lwn of the PSF PyPI Safety & Security Engineer @miketheman's talk on Trusted Publishing at Open Source Summit. 36% of @pypi uploads now use Trusted Publishing. Is yours one of them?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      lwn.net/Articles/1076205/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Julien Palard » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @mdk@mamot.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Dev depuis 2003, dev Python depuis 2010 (donc je code sans LLM).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Je suis à l'aise aussi côté réseau, sysadmin, devops, Linux, C, SQL...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Vrai Full Stack quoi : du métal au CLI, ou du métal à l'API comme tu veux tant qu'il n'y a pas de JS, pas de HTML, pas de CSS (si c'est moi qui fait le front c'est moche).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Mon CV au cas où ça serve encore : mdk.fr/Julien-Palard.pdf

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Région : Yvelines/Hauts-de-Seine/Paris. TT apprécié.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Fabien LOISON (FLOZz) » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @FLOZz@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🐍 Petit rappel pour les adeptes du fourchelang lyonnais : ce soir il y a un Meetup Python à 19h chez @WanadevDigital

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Au programme : découverte de Doctest, un framework de test atypique.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Info et inscription :

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ➡️ meetup.com/fr-fr/python-afpy-l

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #175 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Pass "-i" to to drop into a REPL after your script runs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            $ python -i fibonacci.‍py
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> nth_fibonacci(10)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            55

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            You'll have access to everything the script defined.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Passing "-i" is like pasting your script into a REPL.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            After the script runs, you're dropped into an interactive session with all variables still in scope, even if the script crashed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            It's handy for debugging: run your script, inspect what's in scope, and figure out what went wrong.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Kushal Das :python: :tor: 🇸🇪 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @kushal@toots.dgplug.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Released a new version of my library for written in pypi.org/project/pyuppsala/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                “You can (unofficially) customize the Python REPL syntax highlighting as well.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/repl-features/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  "Dependabot no longer supports Python version 3.9, which has reached its end-of-life. If you continue to use Python 3.9, there’s a risk that Dependabot will not create pull requests to update dependencies. If this affects you, please update to a supported release of Python."

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  github.blog/changelog/2026-06-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Ever wonder how Python's grammar actually fits together? PSF CPython Developer in Residence @encukou is presenting a full railroad diagram of 's entire grammar in the poster session at @europython 2026 on July 16- make sure to check it out! ep2026.europython.eu/session/p

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Back to top - More...