Make context managers with __enter__ & __exit__ Read more 👉 #python
Anyone know whether there's ever been a PEP for storing the end of life date for each Python version within Python? I'm imagining a sys.supported_until datetime object. I'd love to ask each of my current Python installations whether they're supported rather than looking that information up in online docs. #Python
I just published a short screencast on the different ways to merge dictionaries in Python. #Python
I think I just found my least favorite way to accurately check whether a string (value) represents a number in #Python. 😬 value.removeprefix("-").replace(".", "", 1).isnumeric()
I feel very honored to be selected as a PSF fellow this week alongside @npub180dm...m4nr and @npub18f4d...hxlr, who are 2 of the most welcoming folks I know in the Python community. 💖 Jay's post on becoming a fellow: https://kjaymiller.com/blog/on-becoming-a-psf-fellow.html
The / indicates that every argument before the / is a positional-only argument. Read more 👉 #Python
You can think of the tokenize, ast, and dis modules as progressively deeper steps in the process of parsing the code in a Python module. Read more 👉 #Python image