@grifdail someone is attacking #python 🫣🤭
Python Tip #58 (of 365):
Aggregate with reducer functions.
You can combine generator expressions with reducer functions to lazily pre-process data before it's aggregated.
sum(), math.prod(), the string join() method, and any()/all() can all be thought of as reducer functions.
Reducer functions accept an iterable and reduce it down to a single object.
Generator expressions pair well with collection constructors (as in tip #57) AND with reducer functions.
🧵(1/2)
#Python Friday #320: Store Embeddings in ChromaDB - #ai
https://pythonfriday.dev/2026/02/320-store-embeddings-in-chromadb/
Season 1 Lesson 5 Part 6 - Your First Steps - Split Without Arguments - in Python #pythonprogramming #dataanalysis #vibecoding #pythoncode #dataengineer #jupyternotebook #python #softwaredeveloper #codingtutorial #learncoding
Python Tip: defaultdict Magic
from collections import defaultdict
groups = defaultdict(list)
for item in data:
groups[item.category].append(item)
# No KeyError, auto-creates lists
defaultdict creates missing keys automatically. No more 'if key not in dict' checks.
https://raccoonette.gumroad.com/l/Python-for-Beginners-From-Zero-to-Your-First-Projects
#Python #CodingTips #Programming
Python Tip: match/case (Structural Pattern Matching)
match command.split():
case ['go', direction]:
move(direction)
case ['pick', 'up', item]:
grab(item)
case _:
print('Unknown command')
Python 3.10 match/case goes beyond switch statements. It destructures and binds variables.
https://raccoonette.gumroad.com/l/Python-for-Beginners-From-Zero-to-Your-First-Projects
#Python #CodingTips #Programming
Want to keep up with the latest #Python events and news in #Texas? Sign up for the #PyTexas newsletter today!
pytexas.org/newsletter

#Python dataclasses are the weak alternative to #Pydantic...don't argue with an extra dependency
Six years ago I taught my first student Python programming for a non-profit alternative school. Fast forward today and that student is now a man, and he is teaching Python to kids who are on the spectrum at that same school. This is probably the proudest moment in my career.
#Python #programming #teaching
Not my #gamedev work. But someone using the same (niche) engine!! #panda3 #python
Evolution algorithm breeds enemies!
https://youtu.be/tSrzMIWYKBc?si=YqKke_1VWhvNWyLC
Deprecate confusing APIs like “os.path.commonprefix()”. After fixing a vulnerability in #pip, I started digging into the confusing API and found more than I expected.
👉 https://sethmlarson.dev/deprecate-confusing-apis-like-os-path-commonprefix
#python #oss #opensource #security
Closures vs Nested Functions: Scope Magic Comparison
JavaScript closures vs Python nested functions. Which language's scoping system creates more powerful patterns? Prepare to be amazed!
#javascript #python #javascriptvspython #closures #nestedfunctions #scope #programmingcomparison #codecomparison #javascripttricks #pythontricks #functionalprogramming #viralcoding
https://www.youtube.com/watch?v=ilodCyPjAQI