python

Back Open Paginator
13.02.2026 20:10
treyhunner (@treyhunner@mastodon.social)

Python Tip #44 (of 365):

Consider dictionary defaulting carefully.

There are many ways to handle missing dictionary keys in Python. Don't default to just one technique: consider which makes the most sense for your situation.

🧵 (1/3)




Show Original Post


13.02.2026 19:20
NorthBayPython (@NorthBayPython@social.northbaypython.org)

hello

final day for talk submissions

not enough time to use more words

hurry

pretalx.northbaypython.org/nbp

#Python #NBPy




Show Original Post


13.02.2026 18:51
juanbits (@juanbits@mastodon.mx)

feliz viernes 13 Jason 🤭
(Jason happy Friday the 13th)

un buen momazo #geek 🥲 😅

#friday13 #Viernes13 #memes #mexico #devs #json #postgresql #sql #python





Show Original Post


13.02.2026 18:50
f800gecko (@f800gecko@mastodon.online)

Fellow Pythoners,

Should I optimize my CPU-intensive function (which is unsuitable for numpy) by setting up Python multiprocessing first?

Or should I dig into the C & rust options, decide on one of those, and then do the multiprocessing stuff after?

#python #c #rust #technology #programming




Show Original Post


13.02.2026 18:34
pycascades (@pycascades@hachyderm.io)

We’re excited to welcome Łukasz Langa to PyCascades 2026! 💜🐍

CPython Developer in Residence, Python 3.8 & 3.9 release manager, creator of Black, co-host of the core.py podcast… failed comedian, wannabe musician, and dad.

📅 March 21–22, 2026
🎟️ 2026.pycascades.com/

#Python #PyCascades





Show Original Post


13.02.2026 18:33
fabien_torre (@fabien_torre@piaille.fr)

Avec les Masters Éditions (univ. Lille, Pont de Bois), on a fait des concordanciers en Python. #concordancier #python #ulille





Show Original Post


13.02.2026 18:32
247CodeGirl (@247CodeGirl@mastodon.social)

Season 1 Lesson 1 Part 7 - Your First Steps - Print on Same Line - in Python





Show Original Post


13.02.2026 17:49
davep (@davep@fosstodon.org)

Because some subscriptions are stingy with the content of the feed -- trying to force you to visit the actual page in a browser -- I added a "grab page and show text locally" feature to OldNews. But... this can be annoying too because such sites tend to have a lot of cruft surrounding the actual article text.

So I'm playing with a per-subscription selector to whittle down any such download to the real content of an article.

#rss #python #atom #rssreader #terminal





Show Original Post


13.02.2026 17:33
bterwijn (@bterwijn@fosstodon.org)

Understanding a data structure like linked list in Python is a lot easier when you can just see it. Linked_List demo: memory-graph.com/#codeurl=http

𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵 visualizes Python objects and references, so data structures stop being abstract and become something you can debug with ease. No more endless print-debugging. No more stepping through 50 frames just to find one sneaky reference/aliasing mistake.

#Python #programming #memory_graph





Show Original Post


13.02.2026 17:30
Reuven (@Reuven@fosstodon.org)

By default, str.strip in #Python removes leading/trailing whitespace:

s = ' a b c '
s.strip() # returns 'a b c'

It takes an optional argument, naming leading/trailing characters to remove. Great for cleaning strings:

s = '"Hello!"'
s.strip(string.punctuation) # 'Hello'





Show Original Post


13.02.2026 17:30
lobsters (@lobsters@mastodon.social)

microgpt lobste.rs/s/uyjjtz
karpathy.github.io/2026/02/12/




Show Original Post


13.02.2026 17:22
linuxgal (@linuxgal@techhub.social)

#Python #Valentinesday

#! /usr/bin/python3
from matplotlib import pylab
import numpy
x=numpy.linspace(-2,2,1000)
y1=numpy.lib.scimath.sqrt(1-(abs(x)-1)**2)
y2=-3*numpy.lib.scimath.sqrt(1-(abs(x)/2)**0.5)
pylab.fill_between(x,y1,color='red')
pylab.fill_between(x,y2,color='red')
pylab.xlim([-2.5,2.5])
pylab.text(0,-1.5,'Klingons do\nNOT celebrate\nValentines\nDay',fontsize=24,fontweight='bold',color='white',horizontalalignment='center')
pylab.savefig('heart2.png')





Show Original Post


1 ...488 489 490 491 492 493 494 495 496 497 498 ...1589
UP