I'm announcing the Black Friday sale for Python Morsels a week early this year.
It's Lifetime Access to Python Morsels
#Python & #Django educator & team trainer
I help folks sharpen their Python skills with https://PythonMorsels.com🐍🍪
Also a #humanist #YIMBY who is attempting more ethical eating (95% #vegan) and thinks #economics is highly underrated, but I don't post about those topics very often.
he/him
I'm announcing the Black Friday sale for Python Morsels a week early this year.
It's Lifetime Access to Python Morsels
You should define dunder methods on your classes in Python, but you shouldn't call dunder methods.
Read more 👉 https://trey.io/p0h32w
Python's f-strings immediately interpolate the expressions within their replacement fields (the bit between the curly braces).
Read more 👉 https://trey.io/n4mlgb
@pganssle thanks!
Yesterday I was talking to a bunch of computer science teachers about how proud I was that my best programmer in y12 was a girl and one of the middle aged men said quite sagely that he tells his boys that they should look forward to working with girls because they're a different style of programmer and they may not be as good or as fast but they are excellent *communicators*.
He saw no irony in saying that to me when I could program him into a corner with my hands tied behind my back. Snort
#csed
I released a new version of uvrs that includes commands to run pip and to launch a Python REPL for a given script.
https://github.com/treyhunner/uvrs?tab=readme-ov-file#inspecting-a-scripts-environment
What online #Python communities would you most recommend?
For someone new to Python?
For someone using Python but not yet tapped into a community? (outside of their work place / friends)
@pganssle I figure you might have thoughts on this.
I'm trying to avoid making my own giant dictionary mapping just for my most common timezone mappings. 😅
@emattiza Thanks! That gives me the first one but not the others. It seems like there may not be one service that includes a translation between all common formats.
@shearichard I mean I enter PST and it spits out the likely equivalents. I don't care too much whether it gives me just the most likely match or gives me all the possible options (CST could mean Central Standard Time or China Standard Time for example).
Anyone know a site where I can enter a location and it'll tell me all these:
• IANA Time Zone Identifier (America/Los_Angeles)
• Legacy Country/Region Alias (US/Pacific)
• Specific Timezone Abbreviation (PST or PDT)
• Generic Timezone Abbreviation (PT)
Bonus points if it can convert between them.
I will also accept Python packages that convert between all these things.
The #Django Debug Toolbar is looking for some #design help.
If you're interested in seeing helping out, we have more information available at https://github.com/orgs/django-commons/discussions/320 including how to submit your application.
The strftime method does the opposite of strptime: it converts datetime objects to strings, allowing us to specify the format we'd like to use during that conversion.
Read more 👉 https://trey.io/l4b84k
@pg The couple times I've tried a similar conversion with an LLM it worked great.
I never properly learned the shell syntaxes for sh, bash, or zsh and I don't plan to properly learn them anytime soon.
I'm curious to hear whether this works well.
The strftime method does the opposite of strptime: it converts datetime objects to strings, allowing us to specify the format we'd like to use during that conversion.
Read more 👉 https://trey.io/l4b84k
Python allows parentheses just about anywhere, but some unnecessary parentheses can increase confusion more than they increase readability.
I just published a new article on the interesting ways that new #Python programmers often use parentheses in Python.
It's interesting that Python 2 ingrained "print statement" into our collective vocabular so deeply that the phrase is still widely used even though print hasn't been a statement since Python 2.
Are you an experienced speaker and want to help someone with their #PyConUS 2026 proposal? Join the PyCon US Proposal Mentorship Program! We typically get 2x the number of mentees seeking support than we do for volunteer mentors, and need your help!
📝 Sign up to mentor here: https://bit.ly/4ic3i01 by Nov 21, 2025
If you're starting a new project and you need to generate UUIDs, I'd recommend taking a look at uuid7
Read more 👉 https://trey.io/flfwr9
I added support for paragraph-based navigation (moving between groups of consecutive non-blank lines) to pyrepl-hacks and also documented the fact that the #Python REPL supports block-based navigation via the previous-history and next-history commands.